Documentation
¶
Overview ¶
Package version is what a binary says it is.
One package rather than a `version` variable in each of the three mains. Three variables means three -ldflags to remember and three chances to forget one, and a build where two binaries agree and the third says "dev" is a build nobody can report a bug against.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Commit = ""
Commit is the revision the build came from, stamped the same way. Empty when nobody said, which is usual: the module's build info carries it for free on any build from a git checkout.
var Version = "dev"
Version is stamped at build time:
-ldflags "-X github.com/Ceesaxp/telegram-cli/internal/version.Version=v0.4.2"
"dev" when nobody stamped it, which is the honest answer for a `go build` or a `go run` — see String for where it goes to look next.
Functions ¶
func Asked ¶
Asked reports whether the command line is asking for the version and nothing else.
Checked before any flag parsing, in every binary, because two of the three take a subcommand as their first argument and would treat "version" as one — and because -version has to answer on a machine where the config is broken, which is one of the times somebody is most likely to be asking what they are running.
Types ¶
This section is empty.