Documentation
¶
Overview ¶
Package version holds build-time metadata.
Version information is resolved in priority order:
- -ldflags overrides (if set during custom builds)
- Go module version + VCS metadata from runtime/debug.ReadBuildInfo (automatically embedded by Go 1.18+ toolchain for go install @version)
This ensures `go install github.com/pinealctx/gcode/cmd/gcode@latest` produces meaningful version output without any build script.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BuildTime = ""
BuildTime is the build timestamp. Overridden via -ldflags. Defaults to VCS commit time from embedded build info.
View Source
var Commit = ""
Commit is the git commit SHA. Overridden via -ldflags. Defaults to VCS revision from embedded build info.
View Source
var Version = ""
Version is the semantic version. Overridden via -ldflags for custom builds. Defaults to the module version from go.sum, or "dev" for local builds.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.