Skip to content
This repository has been archived by the owner on Jun 18, 2022. It is now read-only.

add version ability #53

Merged
merged 1 commit into from
Oct 12, 2016
Merged

Conversation

StrongMonkey
Copy link

No description provided.

@StrongMonkey
Copy link
Author

rancher/rancher#6174

@ibuildthecloud
Copy link
Contributor

@StrongMonkey I don't quite see what this accomplishes. I think we are looking for something more like https://github.com/rancher/rancher-net/blob/master/main.go#L19

@StrongMonkey
Copy link
Author

@ibuildthecloud changed.

func main() {
if len(os.Args) > 1 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't check the length. Just make the flag a global and make it a bool flag. If some body runs agent -version then the value of the bool flag will be true and then you print the version and exit.

@StrongMonkey StrongMonkey force-pushed the get-version branch 2 times, most recently from abadac7 to ec18907 Compare October 11, 2016 23:44
@ibuildthecloud ibuildthecloud merged commit 474d5ee into rancher:master Oct 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants