We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi All,
I have defined a command that should look like this: ./binary param1 param2
So when the user enters this: ./binary param1 param2 paramX
The parser code somehow ignores paramX and executes the command as if user had entered: ./binary param1 param2
What am I missing? Any suggested way to fix this?
Thanks
The text was updated successfully, but these errors were encountered:
@rathorea, see https://github.com/spf13/cobra#positional-and-custom-arguments for instructions of how to limit the number of accepted parameters to two. I think that you might want to use ExactArgs and, optionally, ExactValidArgs.
ExactArgs
ExactValidArgs
Ref #841
Sorry, something went wrong.
This issue is being marked as stale due to a long period of inactivity
Seems asked and answered; closing.
No branches or pull requests
Hi All,
I have defined a command that should look like this:
./binary param1 param2
So when the user enters this:
./binary param1 param2 paramX
The parser code somehow ignores paramX and executes the command as if user had entered:
./binary param1 param2
What am I missing? Any suggested way to fix this?
Thanks
The text was updated successfully, but these errors were encountered: