diff --git a/docs/doc.md b/docs/doc.md index b635335e..3f0c94ea 100644 --- a/docs/doc.md +++ b/docs/doc.md @@ -2399,6 +2399,7 @@ package main import ( "context" + "errors" "log" "net/http" "os" @@ -2431,7 +2432,7 @@ func main() { // Wait for interrupt signal to gracefully shutdown the server with // a timeout of 5 seconds. - quit := make(chan os.Signal) + quit := make(chan os.Signal, 1) // kill (no param) default send syscall.SIGTERM // kill -2 is syscall.SIGINT // kill -9 is syscall.SIGKILL but can't be caught, so don't need to add it