Documentation
¶
Overview ¶
Package version resolves the build version shown in the CLI banner and by `a-novel version`.
Resolution order (first non-empty wins):
- The ldflags-injected Version var — set by release builds with -X github.com/a-novel-kit/stack/cli/internal/version.Version=v1.2.3
- The module version recorded by `go install module@vX.Y.Z` (debug.ReadBuildInfo → Main.Version).
- The VCS revision baked in by the Go toolchain for `go build` inside a git checkout (short commit, suffixed "-dirty" when the tree is modified).
- The literal "dev" when nothing else is available.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = ""
Version is intentionally a plain var (not a const) so release pipelines can override it at link time without touching source. Leave it empty here — an empty value means "fall back to build info", which keeps local `go run` and `go install @latest` honest about what they actually are.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.