go-flags
go-flags copied to clipboard
Help Displayed for func(bool) should be as for bool
The following example:
type globalOpts struct {
BoolFunc func(bool) `long:"bool-func" description:"..."`
}
produces a help message like this:
Usage:
example [OPTIONS]
Application Options:
--bool-func= ...
In this case, I am using a callback for --bool-func for ease, however, the flag is treated (in the help at least) as if it takes a value assigned to it, rather than being a binary on/off flag, as for a plain bool option.
I think the desired output would be:
Usage:
example [OPTIONS]
Application Options:
--bool-func ...
Thanks!