Skip to content

Commit 198a502

Browse files
guerzonappleboy
andauthored
docs: minor wording and cleanup in graceful shutdown example (#248)
Co-authored-by: Bo-Yi Wu <[email protected]>
1 parent 6a6aa41 commit 198a502

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/en/docs/examples/graceful-restart-or-stop.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ An alternative to endless:
2121
* [graceful](https://github.com/tylerb/graceful): Graceful is a Go package enabling graceful shutdown of an http.Handler server.
2222
* [grace](https://github.com/facebookgo/grace): Graceful restart & zero downtime deploy for Go servers.
2323

24-
If you are using Go 1.8, you may not need to use this library! Consider using http.Server's built-in [Shutdown()](https://golang.org/pkg/net/http/#Server.Shutdown) method for graceful shutdowns. See the full [graceful-shutdown](https://github.com/gin-gonic/examples/tree/master/graceful-shutdown) example with gin.
24+
If you are using Go 1.8 and later, you may not need to use this library! Consider using `http.Server`'s built-in [Shutdown()](https://golang.org/pkg/net/http/#Server.Shutdown) method for graceful shutdowns. See the full [graceful-shutdown](https://github.com/gin-gonic/examples/tree/master/graceful-shutdown) example with gin.
2525

2626
```go
2727
//go:build go1.8
@@ -63,7 +63,7 @@ func main() {
6363
// Wait for interrupt signal to gracefully shutdown the server with
6464
// a timeout of 5 seconds.
6565
quit := make(chan os.Signal, 1)
66-
// kill (no param) default send syscall.SIGTERM
66+
// kill (no params) by default sends syscall.SIGTERM
6767
// kill -2 is syscall.SIGINT
6868
// kill -9 is syscall.SIGKILL but can't be caught, so don't need add it
6969
signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)

0 commit comments

Comments
 (0)