Skip to content

Commit d2d3018

Browse files
committed
Update copyright
1 parent 5642a1b commit d2d3018

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

pkg/http/sse_marshaler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func (j JSONSSEMarshaler) Marshal(ctx context.Context, payload any) (ServerSentE
3131

3232
type StringSSEMarshaler struct{}
3333

34-
func (b StringSSEMarshaler) Marshal(ctx context.Context, payload any) (ServerSentEvent, error) {
34+
func (s StringSSEMarshaler) Marshal(ctx context.Context, payload any) (ServerSentEvent, error) {
3535
data := fmt.Sprint(payload)
3636

3737
return ServerSentEvent{

pkg/http/sse_responder.go

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,38 @@ import (
99
"github.com/go-chi/render"
1010
)
1111

12+
/*
13+
Code based on [go-chi/render](https://github.com/go-chi/render)
14+
15+
Original code copyright (c) 2016-Present https://github.com/go-chi authors
16+
Modifications copyright (c) 2024 Three Dots Labs
17+
18+
MIT License
19+
20+
Permission is hereby granted, free of charge, to any person obtaining a copy of
21+
this software and associated documentation files (the "Software"), to deal in
22+
the Software without restriction, including without limitation the rights to
23+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
24+
the Software, and to permit persons to whom the Software is furnished to do so,
25+
subject to the following conditions:
26+
27+
The above copyright notice and this permission notice shall be included in all
28+
copies or substantial portions of the Software.
29+
30+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
32+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
33+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
34+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
35+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36+
*/
37+
1238
type sseResponder struct {
1339
marshaler SSEMarshaler
1440
}
1541

1642
// Respond handles streaming JSON and XML responses, automatically setting the
1743
// Content-Type based on request headers.
18-
// Based on go-chi/render.
1944
func (s sseResponder) Respond(w http.ResponseWriter, r *http.Request, v interface{}) {
2045
if v != nil {
2146
switch reflect.TypeOf(v).Kind() {

0 commit comments

Comments
 (0)