Running the example/main.go program with a -h flag yields to exit status 1, while it should actually be 0 due to the "benign" nature of the error.
Just to be clear, the following snippet:
if _, err := parser.Parse(); err != nil {
switch flagsErr := err.(type) {
case flags.ErrorType:
if flagsErr == flags.ErrHelp {
os.Exit(0)
}
os.Exit(1)
default:
os.Exit(1)
}
should always result in a exit(0) and nothing else, when the help flag is invoked. Am I correct?
Running the
example/main.goprogram with a-hflag yields to exit status 1, while it should actually be 0 due to the "benign" nature of the error.Just to be clear, the following snippet:
should always result in a exit(0) and nothing else, when the help flag is invoked. Am I correct?