Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildInfo ¶
type BuildInfo struct { // TagVersion is the most recent tag name on the current branch. TagVersion string // PostTagCommits is the number of commits after BuildInfo.TagVersion's commit on the current branch. PostTagCommits uint // CommitHash is the full commit hash. CommitHash string // CommitId is the "short" version of BuildInfo.CommitHash. CommitId string // BuildUser is the user the program was compiled under. BuildUser string // If compiled under sudo, BuildInfo.RealBuildUser is the user that called sudo. RealBuildUser string // BuildTime is the time and date of the program's build time. BuildTime time.Time // BuildHost is the host the binary was compiled on. BuildHost string // Dirty specifies if the source was "dirty" (uncommitted/unstaged etc. files) at the time of compilation. Dirty bool // SourceControl is the source control version used. Only relevant if not a "clean" build or untagged. SourceControl string // Major is the major version, expressed as an uint per spec. Major uint // Minor is the minor version, expressed as an uint per spec. Minor uint // Patch is the patch version, expressed as an uint per spec. Patch uint // Pre Pre string // Build Build string // contains filtered or unexported fields }
BuildInfo contains nativized version information.
var Ver *BuildInfo
Ver is populated by main() from the build script and used in other places.
func Version ¶
Version returns the build information. See build.sh.
func (*BuildInfo) Detail ¶
Detail returns a multiline string containing every possible piece of information we collect.
func (*BuildInfo) Meta ¶
Meta returns the build/compile-time info.
Click to show internal directories.
Click to hide internal directories.