Documentation
¶
Index ¶
Constants ¶
View Source
const Name = "Show version/build information"
Name is the command title.
Variables ¶
This section is empty.
Functions ¶
func NewCommand ¶
NewCommand creates a new version command.
The configuration and the global options are what every command constructor takes, so one signature covers all of them. This command reads neither.
Types ¶
type Info ¶
Info contains injected build environment information.
var Build Info
Build is what the linker wrote into the binary, set by main before any command is built.
It is a package variable rather than a constructor argument because every command constructor takes the same two arguments, and build information is neither configuration nor a flag: it describes the binary rather than the tree it is pointed at or the run an operator asked for.
Click to show internal directories.
Click to hide internal directories.