version

package
v0.0.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 3 Imported by: 0

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

View Source
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.

View Source
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

func Asked(args []string) bool

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.

func String

func String(program string) string

String is the one line a binary prints for -version.

tele-tui v0.4.2 (a1b2c3d, go1.25, darwin/arm64)

The platform is in it because half the bug reports that matter are about a terminal on a platform, and asking afterwards costs a round trip with somebody who has already moved on.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL