alecthomas / kingpin

CONTRIBUTIONS ONLY: A Go (golang) command line and flag parser
MIT License
3.5k stars 273 forks source link

document bool flag option #324

Closed yonpols closed 3 years ago

yonpols commented 3 years ago

The only way to set a boolean flag as "false" is to include the flag with the no- prefix. This fact is not documented anywhere, making it difficult for people to know how to disable a flag.

alecthomas commented 3 years ago

Thanks!

yonpols commented 3 years ago

Thanks!

No problem. How do I create a new version / release for it to be published to https://gopkg.in/alecthomas/kingpin.v2?

sepich commented 12 months ago

Does this makes sense?

Flags:
  -h, --[no-]help          Show context-sensitive help (also try --help-long and --help-man).
      --[no-]version       Show application version.
alecthomas commented 12 months ago

No it doesn't, why do you ask? To get --[no-] you have to use negatable:"".