-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mark experimental flags in --help
#2188
Conversation
5fcd585
to
108be63
Compare
108be63
to
348b61e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks! PTAL @thaJeztah
Wondering; are we also annotating these when rendering the docs at docs.docker.com (mostly curious if this would now show "experimental" twice). |
Hum good point, we already carry the "experimentaCLI" annotation in the yaml definition. We might just want to display "(EXPERIMENTAL)" in the cli then. @dvdksn I think in the docs website we display a blockquote for experimental commands already right? |
yes we have a callout at the top of the page https://docs.docker.com/engine/reference/commandline/buildx_debug_build/ |
f.Annotations = make(map[string][]string) | ||
} | ||
f.Annotations[annotationExperimentalCLI] = nil | ||
f.Usage += " (EXPERIMENTAL)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it would be better to handle this with a custom help template or function, rather than augmenting the cmd.Usage / flag.Usage
https://github.com/spf13/cobra/blob/main/site/content/user_guide.md#defining-your-own-help
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maintenance cost can be higher if we switch away from the default template
Prior to this commit, experimental flags were not distinguishable from regular flags in `--help` Signed-off-by: Akihiro Suda <[email protected]>
348b61e
to
02c2073
Compare
Removed " (EXPERIMENTAL)" from yamls |
Can we merge? |
Prior to this commit, experimental flags were not distinguishable from regular flags in
--help