Documentation ¶
Overview ¶
Variables in this file will be replaced by the linker when Bazel is run with --stamp The time should be in format '2018-12-12 12:30:00 UTC' The GitStatus should be either "clean" or "dirty" Release will be a comma-separated string representation of any tags.
Index ¶
Constants ¶
View Source
const ( // Git status CleanGitStatus = "clean" // Release values PreStampRelease = "no release" // Version constants NotCleanVersionSuffix = " (with local changes)" NoReleaseVersion = "unknown [not built with --stamp]" )
Variables ¶
View Source
var BuildTime = "an unknown time"
BuildTime is a string representation of when this binary was built.
View Source
var GitCommit = "an unknown revision"
GitCommit is the revision this binary was built from.
View Source
var GitStatus = "unknown"
GitStatus is whether the git workspace was clean.
View Source
var HostName = "an unknown machine"
HostName is the machine where this binary was built.
View Source
var IsAspectPro = ""
IsAspectPro indicates if this is an Aspect CLI Pro build
View Source
var Release = "no release"
Release is the revision number, if any.
Functions ¶
Types ¶
type BuildInfo ¶
type BuildInfo struct { BuildTime string HostName string GitCommit string GitStatus string Release string IsAspectPro bool }
func (BuildInfo) CommandVersion ¶
func (bi BuildInfo) CommandVersion(format VersionFormat) string
func (BuildInfo) HasRelease ¶
type VersionFormat ¶
type VersionFormat int
const ( // VersionFormat ConventionalFormat VersionFormat = iota GNUFormat )
Click to show internal directories.
Click to hide internal directories.