You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The runtime/debug.BuildInfo returned by runtime/debug.ReadBuildInfo() has been updated to include a new field Settings[]debug.BuildSetting. Settings in turn are key-value pairs describing a binary. The commit hash is the value for the key vcs.revision, and vcs.time does what you would expect. There’s even vcs.modified to tell you if the build was “dirty” or “clean”.
Go 1.18 provides some built in information to retrieve VCS status from the binary via
debug.BuildInfo
Quoting:
An example implementation https://github.com/carlmjohnson/versioninfo
We should replace current implementation in
version
withdebug.BuildSetting
values.The text was updated successfully, but these errors were encountered: