Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Help Displayed for func(bool) should be as for bool #369

Open
stellarpower opened this issue Aug 14, 2021 · 0 comments
Open

Help Displayed for func(bool) should be as for bool #369

stellarpower opened this issue Aug 14, 2021 · 0 comments

Comments

@stellarpower
Copy link

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!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant