MCPcopy Index your code
hub / github.com/aws/aws-lambda-go / ExampleWithContext

Function ExampleWithContext

lambda/example_test.go:39–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37}
38
39func ExampleWithContext() {
40 lambda.StartWithOptions(
41 func(ctx context.Context) (string, error) {
42 return ctx.Value("foo").(string), nil
43 },
44 lambda.WithContext(context.WithValue(context.Background(), "foo", "bar")),
45 )
46}
47
48func ExampleWithContextValue() {
49 lambda.StartWithOptions(

Callers

nothing calls this directly

Calls 3

StartWithOptionsFunction · 0.92
WithContextFunction · 0.92
ValueMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…