Documentation
¶
Overview ¶
Package buildinfo exposes version, commit, and build timestamp metadata injected via -ldflags or discovered from Go module build info.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Version = "dev" Commit = "none" Date = "unknown" )
Build-time metadata populated via -ldflags during release builds.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
Version string `json:"version"`
Commit string `json:"commit"`
Date string `json:"date"`
GoVersion string `json:"go_version"`
Platform string `json:"platform"`
}
Info describes the compiled binary version and runtime toolchain.
func Current ¶
func Current() Info
Current returns effective build metadata, falling back to debug.ReadBuildInfo when compiled with go install without explicit -ldflags.