Skip to content

Commit 6ca7b7e

Browse files
committed
update readme w/ new context flow
1 parent 84842c4 commit 6ca7b7e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ go get github.com/fcjr/shiftapi
5151

5252
func main() {
5353
ctx := context.Background()
54-
server := shiftapi.New(ctx, shiftapi.WithInfo(shiftapi.Info{
54+
server := shiftapi.New(shiftapi.WithInfo(shiftapi.Info{
5555
Title: "Geeter Demo API",
5656
Description: "It greets you by name.",
5757
}))
5858

5959
handleGreet := shiftapi.Post("/greet", greet)
6060
_ = server.Register(handleGreet) // You should handle errors in production code.
6161

62-
log.Fatal(server.ListenAndServe(":8080"))
62+
log.Fatal(server.ListenAndServe(ctx, ":8080"))
6363
// redoc will be served at http://localhost:8080/docs
6464
}
6565
```

0 commit comments

Comments
 (0)