-
-
Notifications
You must be signed in to change notification settings - Fork 152
Closed
Description
func main() {
var args struct {
One string `required:""`
}
kong.Parse(&args)
}
Outputs:
Usage: test --one=STRING [flags]
Flags:
-h, --help Show context-sensitive help.
--one=STRING
I would expect that Kong would not print the trailing [flags]
, since there are no other expected flags. I believe this is happening because the --help
flag is optional and considered when deciding to print out the [flags]
summary:
Lines 169 to 174 in 5b36573
for _, flag := range allFlags { | |
if !flag.Required { | |
summary += " [flags]" | |
break | |
} | |
} |
It's minor, but it feels like it's implying there are other flags, when there aren't.
Metadata
Metadata
Assignees
Labels
No labels