Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Commit is the short git commit the binary was built from. Commit = "none" // Date is the commit/build date (RFC3339) of the release. Date = "unknown" )
var Version = "0.1.0-rc.4" // x-release-please-version
Version is the release identity compiled into every binary, and the single place the version number lives in the tree.
The trailing annotation is release-please's marker: when it opens a release PR it rewrites the literal on this line to the version being cut, in the same commit that updates CHANGELOG.md, and tags that commit on merge. The tag and this constant therefore cannot drift — do not edit it by hand.
GoReleaser additionally overrides it via -ldflags -X on a release build. The linker only rewrites string variables that are uninitialized or set to a constant expression, so this must stay a plain literal — never computed.
Functions ¶
func FullVersion ¶
func FullVersion() string
FullVersion returns the full version string, e.g. "1.2.3".
func ShortVersion ¶
func ShortVersion() string
ShortVersion returns just the "major.minor" prefix, e.g. "1.2", derived from the resolved Version so it stays correct whether that came from GoReleaser or the compiled defaults.
Types ¶
This section is empty.