From 0a0df1e881a61abd92d0a98e66d7a1daeab84613 Mon Sep 17 00:00:00 2001 From: korya Date: Mon, 17 Apr 2017 13:02:17 -0400 Subject: [PATCH] Use valid exit code value in `os.Exit` call (#405) Exit code value range is 0-255. I think the examples in the main README document should be valid both syntactically and semantically. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2de98401..0d5bbfb1 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ import ( func main() { if err := cmd.RootCmd.Execute(); err != nil { fmt.Println(err) - os.Exit(-1) + os.Exit(1) } } ``` @@ -329,7 +329,7 @@ import ( func main() { if err := cmd.RootCmd.Execute(); err != nil { fmt.Println(err) - os.Exit(-1) + os.Exit(1) } } ```