We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84842c4 commit 6ca7b7eCopy full SHA for 6ca7b7e
1 file changed
README.md
@@ -51,15 +51,15 @@ go get github.com/fcjr/shiftapi
51
52
func main() {
53
ctx := context.Background()
54
- server := shiftapi.New(ctx, shiftapi.WithInfo(shiftapi.Info{
+ server := shiftapi.New(shiftapi.WithInfo(shiftapi.Info{
55
Title: "Geeter Demo API",
56
Description: "It greets you by name.",
57
}))
58
59
handleGreet := shiftapi.Post("/greet", greet)
60
_ = server.Register(handleGreet) // You should handle errors in production code.
61
62
- log.Fatal(server.ListenAndServe(":8080"))
+ log.Fatal(server.ListenAndServe(ctx, ":8080"))
63
// redoc will be served at http://localhost:8080/docs
64
}
65
```
0 commit comments