Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version string Revision string Branch string BuildUser string BuildDate string Toolchain = runtime.Version() Arch = runtime.GOARCH )
Build information. Populated at build-time.
Functions ¶
This section is empty.
Types ¶
type BuildInformation ¶
type BuildInformation struct { Version string `json:"version" mapstructure:"version"` Revision string `json:"revision" mapstructure:"revision"` Branch string `json:"branch" mapstructure:"branch"` BuildDate string `json:"build_date" mapstructure:"build_date"` Toolchain string `json:"toolchain" mapstructure:"toolchain"` BuildUser string `json:"build_user" mapstructure:"build_user"` Arch string `json:"arch" mapstructure:"arch"` }
BuildInformation helps with working with immutable build information.
func (*BuildInformation) BuildContext ¶
func (b *BuildInformation) BuildContext() string
BuildContext returns toolchain, buildUser and buildDate information.
func (*BuildInformation) Info ¶
func (b *BuildInformation) Info() string
Info returns version, branch and revision information.
func (*BuildInformation) ToString ¶
func (b *BuildInformation) ToString() string
Print returns version information.
Click to show internal directories.
Click to hide internal directories.