ExampleWithFunctionARN demonstrates using WithFunctionARN to include the function ARN.
()
| 52 | |
| 53 | // ExampleWithFunctionARN demonstrates using WithFunctionARN to include the function ARN. |
| 54 | func ExampleWithFunctionARN() { |
| 55 | // Include only function ARN |
| 56 | slog.SetDefault(lambdacontext.NewLogger( |
| 57 | lambdacontext.WithFunctionARN(), |
| 58 | )) |
| 59 | |
| 60 | lambda.Start(func(ctx context.Context) (string, error) { |
| 61 | // Log output will include "functionArn" field |
| 62 | slog.InfoContext(ctx, "function invoked") |
| 63 | return "success", nil |
| 64 | }) |
| 65 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…