Skip to content

Commit

Permalink
Merge pull request #1281 from mattn/fix-lambda-doc
Browse files Browse the repository at this point in the history
Fix AWS Lambda advanced docs
  • Loading branch information
cpanato authored Apr 18, 2024
2 parents c19c493 + 8429892 commit d988fd3
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 d988fd3

Please sign in to comment.