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

runtime: Version() string should be more easily discernible #11972

griesemer opened this issue Jul 31, 2015 · 0 comments


Copy link

commented Jul 31, 2015

runtime.Version() prints something like

devel +226b28c Fri Jul 31 18:49:57 2015 +0000

at tip, and, if at a release, something like


There's no easy way to determine which version is younger or older. Tests in external repos sometimes need to be able to distinguish against which version of the std lib they are running; typically they require a certain "minimal" version.

There could be a runtime.VersionNumber() that returns some form of monotonically increasing value/string; or perhaps runtime.VersionTime() could return a value that is easily converted into a time.Time. Alternatively, runtime.Version() could always start with the most recent version, followed by the current version hash if not at a release. That would at least make it possible to discern against tagged releases. For instance:


means we are at the tagged release 1.4.2.

go1.4.2 devel +226b28c Fri Jul 31 18:49:57 2015 +0000

would mean we are at devel +226b28c past 1.4.2, and 1.4.2 is the most recent tagged release.

Another alternative would be to have a time stamp always.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.