cobra
cobra copied to clipboard
Do not generate docs for hidden flags
fixes #1663
@jpmcb The other doc generators already work this way.
man page generation skips hidden flags: https://github.com/spf13/cobra/blob/9e88759b19cd358e9af6f0d778b9a23990cf7f51/doc/man_docs.go#L160
markdown and rest docs use flags.PrintDefaults()
in pflag which skips hidden flags.
The Cobra project currently lacks enough contributors to adequately respond to all PRs. This bot triages issues and PRs according to the following rules:
- After 60d of inactivity, lifecycle/stale is applied. - After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied and the PR is closed. You can:
- Make a comment to remove the stale label and show your support. The 60 days reset. - If a PR has lifecycle/rotten and is closed, comment and ask maintainers if they'd be interseted in reopening.
@jpmcb Any plans to merge this one or should I go ahead and close it out?
We could really use this bugfix. @kevinbarbour any chance you can fix it up? If not, I'm happy to open a new PR.