Skip to content
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

Don't output usage if args are correct #21

Merged
merged 1 commit into from Jun 19, 2021
Merged

Don't output usage if args are correct #21

merged 1 commit into from Jun 19, 2021

Conversation

deboer-tim
Copy link
Collaborator

  • Added 'cmd.SilenceUsage = true' consistently so that the usage is output if the args are incorrect, but not if there are other problems, e.g. communication error. See On error in RunE, do not display usage spf13/cobra#340 for background on why it's done this way.
  • Added a few missing argument validations.
  • Nit in terminology: changed "get" to "list" and "API" to "server"

- Added 'cmd.SilenceUsage = true' consistently so that the usage is output if the args are incorrect, but not if there are other problems, e.g. communication error. See spf13/cobra#340 for background on why it's done this way.
- Added a few missing argument validations.
- Nit in terminology: changed "get" to "list" and "API" to "server"
@deboer-tim deboer-tim merged commit 1e42b4d into main Jun 19, 2021
@deboer-tim deboer-tim deleted the usage branch June 19, 2021 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants