Documentation
¶
Overview ¶
Package version carries the build version.
There are three ways this binary gets built, and all three have to end up reporting something true:
- a release, where GoReleaser stamps all three vars through -ldflags;
- `make build`, which stamps Version from `git describe`;
- `go install github.com/simtabi/authama/src/cmd/sshmgr@latest`, which applies no ldflags at all.
The third is the one the README tells people to use, and it used to report the hardcoded default - "2.0.0-dev", from a binary built out of v3 sources. Go already records the real answer in the binary (`go version -m` shows it), so nothing needed to be threaded through the build: it just had to be read.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Commit = ""
Commit is the short git commit the binary was built from. Release builds stamp it via -ldflags; otherwise it comes from the VCS stamp Go embeds when building inside a repository.
var Date = ""
Date is the build/commit date (RFC 3339), stamped or recovered the same way.
var Version = devDefault
Version is the ssh-manager version. Release builds override it through -ldflags "-X .../internal/version.Version=..."; otherwise it is recovered from the build info Go embeds.
Functions ¶
Types ¶
This section is empty.