Documentation
¶
Overview ¶
Package version exposes build-time metadata (version, commit, build time).
These vars are overridden at link time via -ldflags:
-X github.com/sunholo-data/ailang/internal/version.Version=vX.Y.Z -X github.com/sunholo-data/ailang/internal/version.Commit=<sha> -X github.com/sunholo-data/ailang/internal/version.BuildTime=<iso>
For `go run` / `go test` invocations without ldflags, init() populates Commit/BuildTime from runtime/debug.ReadBuildInfo() when available so the module cache key still differentiates between builds. If no VCS info is available (e.g. outside a git checkout), Commit stays "dev" and the source-hash component of the cache key still catches edits.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Version is the release version (e.g. "v0.11.4"). "dev" for unreleased builds. Version = "dev" // Commit is the git commit SHA the binary was built from. Commit = "dev" // BuildTime is the ISO-8601 build timestamp. BuildTime = "unknown" )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.