Execution with -h should just print the usage instruction and exit
cristim opened this issue · 2 comments
cristim commented
At the moment the execution continues even when executing the program with -h
.
I would expect it to just print usage instructions and exit the program immediately, like the original flag
package is doing.
namsral commented
Exit on error is the default when using the predefined flag set in both flag packages.
// CommandLine is the default set of command-line flags, parsed from os.Args.
// The top-level functions such as BoolVar, Arg, and on are wrappers for the
// methods of CommandLine.
var CommandLine = NewFlagSet(os.Args[0], ExitOnError)
See https://github.com/namsral/flag/blob/v1.7.4-pre/flag.go#L1040
namsral commented
No response from OP, closing issue.