Documentation
¶
Overview ¶
Package version is the single source of truth for the build version string. The variables here are overridden at build time via -ldflags:
go build \ -ldflags "-X github.com/lenaxia/llmsafespaces/pkg/version.Version=v0.5.1 -X github.com/lenaxia/llmsafespaces/pkg/version.CommitSHA=<sha> -X github.com/lenaxia/llmsafespaces/pkg/version.BuildTime=<ts>"
When unset (e.g. an un-stamped local build), all three report "unknown" so a missing injection is obvious. The release workflow sets them from the git tag, sha, and build time.
Each component that exposes a version surface (API /livez, /v1/admin/platform-info; workspace-agentd /v1/healthz; the controller startup log; the relay healthz endpoints) reads from here so we never have two competing version strings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BuildTime = "unknown"
BuildTime is the UTC build timestamp. Overridden at build time. See package doc.
var CommitSHA = "unknown"
CommitSHA is the git commit the binary was built from. Overridden at build time. See package doc.
var Version = "unknown"
Version is the build version. Overridden at build time. See package doc.
Functions ¶
func Commit ¶ added in v0.15.8
func Commit() string
Commit returns the resolved commit SHA ("unknown" when it cannot be determined from either ldflags or build info — which is itself a build-pipeline bug worth investigating).
func Full ¶ added in v0.15.8
func Full() string
Full returns the one-line human identity including build time, e.g. "v0.15.7+gd93e52ea (built 2026-08-15T20:43:36Z)". Used where a single log line should carry the complete build identity (controller startup banner).
func String ¶ added in v0.15.8
func String() string
String returns the full build identity, e.g. "v0.15.7+gd93e52ea".
Components that remain unknown after fallback resolution are OMITTED, not rendered as "unknown": a bare "v0.15.7" from String() therefore means "the commit could not be determined", making un-stamped builds visibly deficient instead of silently masquerading as a clean release. (Incident 2026-08-15: a devel hash build reported "0.15.7" via /v1/healthz and the commit never surfaced anywhere, making deployed-code identification require binary disassembly.)
Types ¶
This section is empty.