Use valid exit code value in os.Exit call

Exit code value range is 0-255. I think the examples in the main README document should be valid both syntactically and semantically.
This commit is contained in:
korya 2017-03-28 13:38:44 -04:00 committed by GitHub
parent 7be4beda01
commit 5d83214f6c

View file

@ -168,7 +168,7 @@ import (
func main() { func main() {
if err := cmd.RootCmd.Execute(); err != nil { if err := cmd.RootCmd.Execute(); err != nil {
fmt.Println(err) fmt.Println(err)
os.Exit(-1) os.Exit(1)
} }
} }
``` ```
@ -329,7 +329,7 @@ import (
func main() { func main() {
if err := cmd.RootCmd.Execute(); err != nil { if err := cmd.RootCmd.Execute(); err != nil {
fmt.Println(err) fmt.Println(err)
os.Exit(-1) os.Exit(1)
} }
} }
``` ```