flag: package level nor CommandLine
var docs mention default behavior of -h
or -help
flags
#66708
Labels
CommandLine
var docs mention default behavior of -h
or -help
flags
#66708
Out of the box, the default
flag.FlagSet
variable,flag.CommandLine
, will print usage information and exit0
if-h
or-help
is given and a flag with that name was not already registered. This nicety feature is great, however I discovered by surprise! Looking through theflag
documentation at1.22.2
, I found mention of the-h
and-help
flags inErrHelp
's documentation, but nothing at the package level or onCommandLine
specifically about this default behavior.I am happy to open a PR to improve documentation in this area if it would be well receive :).
The text was updated successfully, but these errors were encountered: