Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for -version=raw to print the Go version.Info
This can be helpful to print the internal fields of the version information that will contain more details about the git tree than the short -version output will. Tested: - Tested getting the raw version: $ _output/go/bin/kubecfg -version=raw version.Info{Major:"0", Minor:"1+", GitVersion:"v2.2.1-33-gdc4becd9765393", GitCommit:"dc4becd9765393fa05a3eb06f6af9e00068fe0c5", GitTreeState:"dirty"} - Tested getting the simple version: $ _output/go/bin/kubecfg -version Kubernetes version 0.1+, build dc4becd - Tested getting the help output: $ _output/go/bin/kubecfg 2>&1 | grep -- -version -version=false: Print version information and quit - Made sure -version=true and -version=false works, that -version with an invalid argument works as expected (prints usage help) and that -version followed by space will not try to use the next word as its argument (i.e. `-version raw` prints the version but not the raw one.) Signed-off-by: Filipe Brandenburger <filbranden@google.com>
- Loading branch information