Documentation
¶
Overview ¶
package: version / build type: logic job: Command — the `version` verb every binary carries, so one build names itself the same way whichever you ran limits: prints what version.String resolved (-> version.go)
package: version / build type: logic job: String — the version this binary reports, from the linker or its own build info limits: reads what the toolchain stamped; no git, no filesystem
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Command ¶ added in v1.23.0
Command builds the `version` subcommand for binary. Shared so the three agree on the wording: a release cut from one tag should not describe itself two ways.
func String ¶
func String() string
String reports this build's version, preferring the linker's value, then the module version a `go install module@version` stamped, then the revision a build from a checkout carries. Every path leaves the binary able to name itself, which is why there are three: a bare `go build` gets no linker flag and a released module has no VCS.
Types ¶
This section is empty.