From fd3f53f3a30a779fcc83539a1bcd50f3779079ca Mon Sep 17 00:00:00 2001 From: nakultt Date: Wed, 28 Oct 2026 14:37:53 +0530 Subject: [PATCH] docs(lambda): document that Start accepts a Handler implementation lambda.Start also accepts any value implementing the Handler interface, which is what the deprecation notice on StartHandler points users to, but the Start doc comment only described function handlers. Fixes #566 --- lambda/entry.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lambda/entry.go b/lambda/entry.go index 6d898f49..fd040e9b 100644 --- a/lambda/entry.go +++ b/lambda/entry.go @@ -12,7 +12,12 @@ import ( // handler does not match one of the supported types an appropriate error message will be returned to the caller. // Start blocks, and does not return after being called. // -// Rules: +// The handler may be a value that implements the Handler interface, in which case its Invoke method +// is called with the raw request payload and its return value is sent as the raw response: +// +// func (h MyHandler) Invoke(ctx context.Context, payload []byte) ([]byte, error) +// +// Otherwise, the handler must be a function that follows these rules: // // - handler must be a function // - handler may take between 0 and two arguments.