Skip to content

Commit a476bab

Browse files
Updated README
1 parent c37df95 commit a476bab

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

demux/handler_test.go

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"errors"
66
"github.com/aws/aws-lambda-go/events"
7-
"github.com/aws/aws-lambda-go/lambda"
87
"github.com/stretchr/testify/assert"
98
"reflect"
109
"testing"
@@ -211,41 +210,3 @@ func TestHandlerMapCreationFailsWithBadHandler(t *testing.T) {
211210
"lambda demux handler function: expected a handler function; got *errors.errorString")
212211
assert.Nil(t, handlerMap)
213212
}
214-
215-
func foo() {
216-
cfg := &Cfg{
217-
Factories: []Factory{
218-
func(ctx *EventContext) any {
219-
if HasAttribute(ctx.event, "connectionId") {
220-
return &events.APIGatewayWebsocketProxyRequest{}
221-
}
222-
return &events.APIGatewayProxyRequest{}
223-
},
224-
},
225-
Handlers: []any{
226-
func(ctx context.Context, event *events.APIGatewayWebsocketProxyRequest) (
227-
*events.APIGatewayProxyResponse,
228-
error) {
229-
// TODO - your code here to handle websocket event
230-
return &events.APIGatewayProxyResponse{}, nil
231-
},
232-
func(ctx context.Context, event *events.APIGatewayProxyRequest) (
233-
*events.APIGatewayProxyResponse,
234-
error) {
235-
// TODO - your code here to handle HTTP/REST event
236-
return &events.APIGatewayProxyResponse{}, nil
237-
},
238-
},
239-
}
240-
241-
lambda.Start(NewHandler(cfg))
242-
}
243-
244-
type someHandler struct {
245-
}
246-
247-
func (s *someHandler) HandleEvent(
248-
_ context.Context,
249-
_ *events.APIGatewayWebsocketProxyRequest) (*events.APIGatewayProxyResponse, error) {
250-
return nil, nil
251-
}

0 commit comments

Comments
 (0)