-
Notifications
You must be signed in to change notification settings - Fork 275
Closed
Description
Correctly calling --help shouldn't fail with exit code 1, it should be exit code 0. With the test program:
var (
verbose = kingpin.Flag("verbose", "Verbose mode.").Short('v').Bool()
name = kingpin.Arg("name", "Name of user.").Required().String()
)
func main() {
kingpin.Parse()
fmt.Printf("%v, %s\n", *verbose, *name)
} ~ › go run test.go --help
usage: test [<flags>] <name>
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
-v, --verbose Verbose mode.
Args:
<name> Name of user.
exit status 1
✗ exit 1Metadata
Metadata
Assignees
Labels
No labels