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-04-17 13:02:17 -04:00 committed by Albert Nigmatzianov
parent 9350054794
commit 0a0df1e881
1 changed files with 2 additions and 2 deletions

View File

@ -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)
}
}
```