Documentation
¶
Overview ¶
Package version holds build-time metadata for flakehunter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "dev" Commit = "none" BuildDate = "unknown" )
Populated at build time via -ldflags.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
Version string `json:"version"`
Commit string `json:"commit"`
BuildDate string `json:"buildDate"`
GoVersion string `json:"goVersion"`
Platform string `json:"platform"`
}
Info bundles the version metadata reported by the version command.
func Current ¶
func Current() Info
Current returns the version metadata for this binary.
Release builds inject the values above via -ldflags. A binary produced by `go install` gets no ldflags, so it would otherwise report "dev" forever — the module version and VCS stamps embedded by the toolchain are read back here to fill the gap.
Click to show internal directories.
Click to hide internal directories.