Documentation
¶
Overview ¶
Package version resolves build metadata for the running binary.
Version resolution is delegated to clive: an ldflag-injected version when the build sets one (mise run install, GoReleaser), falling back to debug.BuildInfo so `go install ...@latest` and plain `go build` binaries report a real version instead of "dev". Commit, build time, and dirtiness come from the VCS metadata Go embeds at build time — no ldflags needed. Branch and BuildBy are jira-specific ldflags that clive does not model.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Branch = "unknown" BuildBy = "unknown" )
Linker-injected build metadata clive does not model. Set via -ldflags; "unknown" otherwise.
Functions ¶
func BuildTime ¶
func BuildTime() string
BuildTime returns the commit timestamp (RFC 3339) embedded by the build, or "unknown" when no VCS info is present.
func Commit ¶
func Commit() string
Commit returns the short VCS revision the binary was built from, or "unknown" when the build embedded no VCS info.
Types ¶
This section is empty.