@@ -14,24 +14,24 @@ import (
14
14
//
15
15
// Rules:
16
16
//
17
- // * handler must be a function
18
- // * handler may take between 0 and two arguments.
19
- // * if there are two arguments, the first argument must satisfy the "context.Context" interface.
20
- // * handler may return between 0 and two arguments.
21
- // * if there are two return values, the second argument must be an error.
22
- // * if there is one return value it must be an error.
17
+ // - handler must be a function
18
+ // - handler may take between 0 and two arguments.
19
+ // - if there are two arguments, the first argument must satisfy the "context.Context" interface.
20
+ // - handler may return between 0 and two arguments.
21
+ // - if there are two return values, the second argument must be an error.
22
+ // - if there is one return value it must be an error.
23
23
//
24
24
// Valid function signatures:
25
25
//
26
- // func ()
27
- // func () error
28
- // func (TIn) error
29
- // func () (TOut, error)
30
- // func (TIn) (TOut, error)
31
- // func (context.Context) error
32
- // func (context.Context, TIn) error
33
- // func (context.Context) (TOut, error)
34
- // func (context.Context, TIn) (TOut, error)
26
+ // func ()
27
+ // func () error
28
+ // func (TIn) error
29
+ // func () (TOut, error)
30
+ // func (TIn) (TOut, error)
31
+ // func (context.Context) error
32
+ // func (context.Context, TIn) error
33
+ // func (context.Context) (TOut, error)
34
+ // func (context.Context, TIn) (TOut, error)
35
35
//
36
36
// Where "TIn" and "TOut" are types compatible with the "encoding/json" standard library.
37
37
// See https://golang.org/pkg/encoding/json/#Unmarshal for how deserialization behaves
@@ -51,7 +51,7 @@ func StartWithContext(ctx context.Context, handler interface{}) {
51
51
//
52
52
// Handler implementation requires a single "Invoke()" function:
53
53
//
54
- // func Invoke(context.Context, []byte) ([]byte, error)
54
+ // func Invoke(context.Context, []byte) ([]byte, error)
55
55
//
56
56
// Deprecated: use lambda.Start(handler) instead
57
57
func StartHandler (handler Handler ) {
83
83
//
84
84
// Handler implementation requires a single "Invoke()" function:
85
85
//
86
- // func Invoke(context.Context, []byte) ([]byte, error)
86
+ // func Invoke(context.Context, []byte) ([]byte, error)
87
87
//
88
88
// Deprecated: use lambda.StartWithOptions(handler, lambda.WithContext(ctx)) instead
89
89
func StartHandlerWithContext (ctx context.Context , handler Handler ) {
0 commit comments