version

package
v1.21.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: GPL-3.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "dev"
	Commit  = "none"
	Date    = "unknown"
)

Version, Commit, and Date are set at link time by goreleaser/`make build` via -ldflags. When the binary is built without that injection — most importantly `go install github.com/CommitBrief/commitbrief/cmd/commitbrief@vX.Y.Z` — Resolve() backfills them from the Go module BuildInfo (see Resolve doc).

Functions

func Info

func Info() string

func Resolve added in v0.6.0

func Resolve()

Resolve fills Version/Commit/Date from runtime/debug.BuildInfo when they still hold their compile-time defaults. ldflags-injected values always win, so production binaries (brew, scoop, GitHub Releases tarballs) are unaffected. `go install …@vX.Y.Z` benefits: Main.Version becomes "vX.Y.Z" and the VCS settings carry the upstream commit and build timestamp, so --version stops reporting "dev (commit none, built unknown)".

Not auto-called via init(): existing tests assert the bare defaults, and main() is the single right place to opt in.

Types

This section is empty.

Jump to

Keyboard shortcuts

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