Documentation
¶
Overview ¶
Package buildinfo carries the version string of the running binary.
The release path stamps Version at link time:
-X github.com/appshapes/brigade/internal/buildinfo.Version=0.1.0
`go install github.com/appshapes/brigade/cmd/brigade@v0.1.0` applies no ldflags, so Version is empty there and String falls back to the module version recorded by the toolchain in the binary's build info.
Index ¶
Constants ¶
View Source
const Unknown = "unknown"
Unknown is reported when neither the link-time stamp nor the embedded build info names a version — a plain `go build` with -buildvcs=false, or `go run`.
Variables ¶
View Source
var Version string
Version is set at link time by the -X flag above. It is deliberately a plain var and not a const: a const would be inlined and -X could not reach it.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.