GoogleCloudPlatform/kubernetes — pull request #1121 by filbranden (2014-08-30 06:25:04+00:00)
Title: Add support for -version=raw

Running binaries with `-version=raw` will print the raw (as in `%#v`) version.Info of the build.

At some point I want to make `-version` print a more succint version string, so it's good to expose the full raw information.

This will also be useful when there's a version mismatch between client and server, using `-version=raw` can help us diagnose the problem.

I implemented it by creating a new tri-state `flag` type Version, which can be VersionFalse, VersionTrue or VersionRaw.

Later on, I intend to use this same flag format for the `-server_version` of `kubecfg`.

Second commit in the series renames pkg/version/flag to pkg/version/verflag to prevent confusion with the flag built-in module. It was being imported under that name anyways, so we might as well just call it that and be done with it.