Documentation
¶
Overview ¶
Package buildinfo holds the identity of the running binary: the version, commit and build date the release build stamps in through ldflags. It is the one place those values live, so the --version flag, the admin system route and the User-Agent an outbound request presents all report the same build.
It sits below every other package (it imports nothing first-party) because the outbound transport seam, internal/upstreamauth, needs the version and cannot import the server package that used to hold it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Commit = "none"
Commit is the git short commit hash, set at build time via ldflags.
var Date = "unknown"
Date is the build timestamp, set at build time via ldflags.
var Version = "dev"
Version is the release version, set at build time via ldflags. A build without one, such as `go run`, reports "dev".
Functions ¶
func Build ¶ added in v1.166.2
func Build() string
Build is the identity the platform names itself by on every HTTP response and in the portal page it serves (#2727): the version and the commit, so two builds of one version from different commits (two dev builds) differ. A build that stamped no commit is its version alone. --version reports both halves.
Types ¶
This section is empty.