-
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
Mark flag mutually exclusive and required #1761
Labels
area/flags-args
Changes to functionality around command line flags and args
Comments
marckhouzam
added
the
area/flags-args
Changes to functionality around command line flags and args
label
Jul 23, 2022
Hi @shanduur-auto. Currently there is no special support from Cobra for what you are asking. You would have to do the verification yourself in your program. |
The Cobra project currently lacks enough contributors to adequately respond to all issues. This bot triages issues and PRs according to the following rules:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
I want to ask, if there is an option to mark one of
n
of the mutually exclusive flags required? This means there must appear exactly one of then
flags, otherwise an error should be printed.For example:
The text was updated successfully, but these errors were encountered: