From d16dde2820213a9beb5ebf546bd4501225164690 Mon Sep 17 00:00:00 2001 From: Kenneth Tan Xin You Date: Wed, 7 Oct 2020 16:55:31 +0800 Subject: [PATCH] Update README.md defer os_exit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 35eea9f..9a86248 100644 --- a/README.md +++ b/README.md @@ -496,7 +496,7 @@ func main() { // <-ctx.Done() if your application should wait for other services // to finalize based on context cancellation. log.Println("shutting down") - os.Exit(0) + defer os.Exit(0) } ```