version

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 2 Imported by: 0

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