github.com/Foodji/aws-lambda-go@v1.20.2/cmd/build-lambda-zip/testdata/noop.go (about) 1 // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved 2 3 package main 4 5 import ( 6 "context" 7 "github.com/aws/aws-lambda-go/lambda" 8 ) 9 10 type BinaryHandler func(context.Context, []byte) ([]byte, error) 11 func (bh BinaryHandler) Invoke(ctx context.Context, req []byte) ([]byte, error) { 12 return bh(ctx, req) 13 } 14 15 func noop (ctx context.Context, req []byte) ([]byte, error) { 16 return req, nil 17 } 18 19 func main() { 20 lambda.StartHandler(BinaryHandler(noop)) 21 }