-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feature: support more group flags #1936
Comments
I recently opened a PR #1952 which should address point 3. |
@YoniRomm My PR should actually address point 1 as well. You can create two flag groups and set The only thing not covered is 2, which, if I understand correctly is not about the flag itself (its name) but its value? I think there is no way to do that currently out-of-the-box, but you could also implement your own logic to check if the flag value comes from a list of expected options. |
@gabguy I am not a maintainer, so I cannot create releases. I do know, however, that the addition of |
@YoniRomm @gabguy 1.8.0 was released which contains the feature: https://github.com/spf13/cobra/releases/tag/v1.8.0 |
I had a use cases where I needed:
MarkFlagsRequiredTogether
but between 2 groups)MarkFlagsMutuallyExclusive
)The text was updated successfully, but these errors were encountered: