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

Added --version flag #68

Closed
wants to merge 1 commit into from
Closed

Added --version flag #68

wants to merge 1 commit into from

Conversation

jdewinne
Copy link
Member

Fixes #26 (using the flag -v or --version)

@xavpaice
Copy link
Member

xavpaice commented Jan 4, 2023

Is it possible to create a versioning similar to how we do this in Troubleshoot with "github.com/replicatedhq/troubleshoot/pkg/version"? Also, in Troubleshoot we use support-bundle version rather than --version, reserving -v for verbose.

FWIW we're planning to include this repo in the Troubleshoot repo (hence the need for consistency).

@jdewinne
Copy link
Member Author

jdewinne commented Jan 4, 2023

This uses the default from cobra. So making it a command would deviate from that. But can of course be done.

@banjoh
Copy link
Member

banjoh commented Jan 4, 2023

I'm also leaning towards version command instead of GNU's --version flag mainly cause of 2 reasons.

  1. It seems to be the preferred way tools follow in k8s ecosystem e.g helm, kompose, kubectl, crictl... Some out there may defer of course like prometheus, but still :)
  2. There is a thought of adopting klog logging library which gives us log levels that use -v=3 like flags to allow increasing/decreasing the amount of logging printed out. If we use --version/-v, we rule out any opportunity of adopting the lib

@xavpaice
Copy link
Member

Closing, we won't merge this in preference of a version subcommand. replicatedhq/troubleshoot#933 will handle that.

@xavpaice xavpaice closed this May 29, 2023
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.

Add version command
3 participants