versioninfo

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package versioninfo exposes the trace CLI version metadata.

The Version and Commit variables are set at build time via ldflags by goreleaser:

-X github.com/GrayCodeAI/trace/cmd/trace/cli/versioninfo.Version={{.Version}}
-X github.com/GrayCodeAI/trace/cmd/trace/cli/versioninfo.Commit={{.ShortCommit}}

The VERSION file at the repo root is the canonical source of truth used by release tooling (release-please) and CI; goreleaser derives the version from the matching git tag at release time.

The default "dev" value applies only to local builds without ldflags, so developers can immediately see when they're running an unreleased binary.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the semantic version. Set via ldflags at release time.
	Version = "dev"

	// Commit is the git commit short SHA. Set via ldflags at release time.
	Commit = "none"
)

Functions

func Load

func Load()

Load fills Version and Commit from the binary's build info when ldflags left them at their defaults. Call once from main() before either is read.

Types

This section is empty.

Jump to

Keyboard shortcuts

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