Skip to content

Commit

Permalink
Fix AWS Lambda advanced docs
Browse files Browse the repository at this point in the history
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
  • Loading branch information
mattn committed Apr 18, 2024
1 parent c19c493 commit 8429892
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/advanced/lambda.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ For example:
package main

import (
"fmt"
"context"
"github.com/aws/aws-lambda-go/lambda"
"context"
"fmt"
"github.com/aws/aws-lambda-go/lambda"
)

type Event struct {
Name string `json:"name"`
// TODO: add other request fields here.
Name string `json:"name"`
// TODO: add other request fields here.
}

func main() {
lambda.Start(func(ctx context.Context, event Event) (string, error) {
return fmt.Sprintf("Hello %s!", event.Name), nil
}
lambda.Start(func(ctx context.Context, event Event) (string, error) {
return fmt.Sprintf("Hello %s!", event.Name), nil
})
}
```

Expand Down

0 comments on commit 8429892

Please sign in to comment.