Documentation
¶
Overview ¶
Package version reports what build this is.
The values are injected at link time. A build without them reports "dev" rather than an empty string or a plausible-looking version: a binary that cannot say what it is should say so, not guess.
Index ¶
Constants ¶
View Source
const ( SourceRelease = "release" SourceLocal = "local" )
The two origins that matter. Anything else is a build we cannot account for, and is treated as local — the cautious reading, since it is the one that refuses to overwrite.
Variables ¶
View Source
var ( Version = "" Commit = "" Date = "" // Source is how this binary was produced. Only the release pipeline sets // it to SourceRelease; every other path leaves it as it found it. // // It is a separate variable rather than a shape inferred from Version // because `update` refuses to overwrite a binary it did not publish, and a // decision like that should not rest on parsing a string that anyone can // pass on a command line. Source = "" )
Injected via -ldflags at build time.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.