mirror of
https://github.com/spf13/cobra
synced 2024-11-04 21:07:19 +00:00
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.
This commit is contained in:
parent
9350054794
commit
0a0df1e881
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue