Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCommit ¶ added in v0.2.14
func GetCommit() string
GetCommit returns the short commit hash, or "unknown" if not set.
func GetDate ¶ added in v0.2.14
func GetDate() string
GetDate returns the build date, or "unknown" if not set.
func Set ¶
func Set(v string)
Set stores the application version. Call from main() before HTTP clients are created.
func SetBuildInfo ¶ added in v0.2.14
func SetBuildInfo(c, d string)
SetBuildInfo stores commit hash and build date alongside the version.
Types ¶
type InfoData ¶ added in v0.2.14
type InfoData struct {
Version string `json:"version" yaml:"version"`
Commit string `json:"commit" yaml:"commit"`
BuildDate string `json:"buildDate" yaml:"buildDate"`
Go string `json:"go" yaml:"go"`
OS string `json:"os" yaml:"os"`
Arch string `json:"arch" yaml:"arch"`
}
InfoData holds structured version metadata for JSON/YAML serialization.
Click to show internal directories.
Click to hide internal directories.