Skip to content

Commit 847f289

Browse files
committed
fix: return correct type for function url streaming
1 parent 824958b commit 847f289

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

handler/functionurl.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func functionURLStreamingResponseInitializer(ctx context.Context) *ResponseWrite
8080
return NewResponseWriterProxy()
8181
}
8282

83-
func functionURLStreamingResponseFinalizer(ctx context.Context, w *ResponseWriterProxy) (events.LambdaFunctionURLStreamingResponse, error) {
83+
func functionURLStreamingResponseFinalizer(ctx context.Context, w *ResponseWriterProxy) (*events.LambdaFunctionURLStreamingResponse, error) {
8484
out := events.LambdaFunctionURLStreamingResponse{
8585
StatusCode: w.Status,
8686
Headers: make(map[string]string),
@@ -102,13 +102,13 @@ func functionURLStreamingResponseFinalizer(ctx context.Context, w *ResponseWrite
102102
}
103103
}
104104

105-
return out, nil
105+
return &out, nil
106106
}
107107

108108
func NewFunctionURLHandler(adapter AdapterFunc) func(context.Context, events.LambdaFunctionURLRequest) (events.LambdaFunctionURLResponse, error) {
109109
return NewHandler(functionURLRequestConverter, functionURLResponseInitializer, functionURLResponseFinalizer, adapter)
110110
}
111111

112-
func NewFunctionURLStreamingHandler(adapter AdapterFunc) func(context.Context, events.LambdaFunctionURLRequest) (events.LambdaFunctionURLStreamingResponse, error) {
112+
func NewFunctionURLStreamingHandler(adapter AdapterFunc) func(context.Context, events.LambdaFunctionURLRequest) (*events.LambdaFunctionURLStreamingResponse, error) {
113113
return NewHandler(functionURLRequestConverter, functionURLStreamingResponseInitializer, functionURLStreamingResponseFinalizer, adapter)
114114
}

0 commit comments

Comments
 (0)