Documentation
¶
Overview ¶
Package version carries the build version, stamped via -ldflags.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "dev"
Version is set at build time: -X .../version.Version=v0.x.y
Functions ¶
Types ¶
type Parsed ¶
type Parsed struct {
Major, Minor, Patch int
// Ahead is the commit count past the tag (the -N- in git describe), so
// v0.3.1-4-gabc sorts after v0.3.1.
Ahead int
Unknown bool
}
Parsed is a build version broken into comparable parts.
Versions are `git describe` output, not clean semver: "v0.3.1", "v0.3.1-4-gabc1234" (4 commits past the tag) or "dev" on an untagged build. Anything that does not start with a vX.Y.Z tag is Unknown, and an unknown version is never treated as older or newer than a known one — guessing there would let an upgrade planner skip a node it cannot reason about.
Click to show internal directories.
Click to hide internal directories.