Documentation
¶
Overview ¶
Package version exposes build-time metadata injected via -ldflags.
The variables Version, Commit, and BuiltAt are normally set by the Makefile (or CI) using linker flags; their zero values are appropriate for `go run` and `go test` only. GSEER never claims a version it cannot substantiate (SPEC-03 §4: checksums, not signatures, in v0.0.1; `gseer doctor` prints the running binary's SHA-256).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Version is the semantic version string, e.g. "v0.0.1". When built // without ldflags it is "dev" — `gseer doctor` reports this honestly. Version = "dev" // Commit is the VCS commit hash the binary was built from. Empty // when built without ldflags (e.g. `go run`); reported as "unknown". Commit = "" // BuiltAt is the build timestamp in RFC3339 form. Empty when built // without ldflags; reported as "unknown". BuiltAt = "" )
Variables injected via -ldflags "-X ...". Defaults are intentionally honest: when not injected, we say so plainly rather than fabricating a version (AC-8.x documentation honesty; the honesty floor).
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
Version string `json:"version"`
Commit string `json:"commit"`
BuiltAt string `json:"built_at"`
GoVersion string `json:"go_version"`
}
Info is the structured form of the build metadata. The CLI's `version` command renders this; future surfaces (doctor, /api/v1/version) reuse it.