Documentation
¶
Overview ¶
Package version holds build-time metadata injected by the release toolchain.
Variables are set via -ldflags at build time (see Makefile and .goreleaser.yaml). Local development builds fall back to "dev" / "unknown".
Example ldflags (from the Makefile):
-X github.com/uberware/sqi/internal/version.Version=v0.1.0 -X github.com/uberware/sqi/internal/version.Commit=abc1234 -X github.com/uberware/sqi/internal/version.BuildDate=2026-05-29T12:00:00Z -X github.com/uberware/sqi/internal/version.GoVersion=go1.26.3
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BuildDate = "unknown"
BuildDate is the UTC timestamp of the build in RFC 3339 format.
var Commit = "unknown"
Commit is the short git commit hash of the build.
var GoVersion = "unknown"
GoVersion is the Go toolchain version used to build the binary.
var Version = "dev"
Version is the semantic version tag, e.g. "v0.1.0" or "dev".
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
Version string `json:"version"`
Commit string `json:"commit"`
BuildDate string `json:"build_date"`
GoVersion string `json:"go_version"`
}
Info is an immutable snapshot of the build metadata, suitable for injection into consumers (e.g. the API layer) that should not read the package variables directly so they can be tested deterministically.