version

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT 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

Overview

Package version exposes build metadata stamped into the binary via -ldflags -X at build time (see the Makefile). A plain `go build`/`go install` without those flags falls back to the defaults below, so the package is always safe to import and never panics on a missing value.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the build version, e.g. a git describe like "v0.1.0-2-g1a2b3c4"
	// or a bare commit hash when no tag exists. Overridden at build time.
	Version = "dev"
	// GitCommit is the short git commit hash the binary was built from.
	GitCommit = "unknown"
	// BuildDate is the UTC build timestamp (RFC3339). Overridden at build time.
	BuildDate = "unknown"
)

Functions

func Info

func Info() string

Info returns the full build metadata as an aligned multi-line block: version, commit, build date, and the Go toolchain version.

func Short

func Short() string

Short returns just the version string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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