Documentation
¶
Overview ¶
Package buildinfo holds the version, build time and release channel the build scripts inject, for the CLI and the admin version endpoint. It is kept apart from the composition root so both can import it.
Index ¶
Constants ¶
const ( ChannelStable = "stable" ChannelBeta = "beta" ChannelNightly = "nightly" ChannelDev = "dev" )
Release channels. A build that does not have Channel injected is a local developer build.
Variables ¶
var ( Version = "unknown version" BuildTime = "unknown time" // Channel names the release channel this binary was built for. Every build // path injects it alongside Version; never infer the channel from the shape // of the version string. Channel = ChannelDev )
The build metadata, injected with -ldflags -X at build time.
Functions ¶
func ChannelLabel ¶
ChannelLabel returns the suffix shown next to the version for builds that did not come from the stable channel. Stable builds carry no suffix.
func Display ¶
func Display() string
Display returns the version string the CLI and the admin API show operators. The channel comes from Channel and never from the shape of Version: the release pipelines strip the tag's leading "v", so classifying a build by that prefix reported every published release as a development build.
Types ¶
This section is empty.