buildinfo

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package buildinfo carries version metadata stamped into the binary at link time.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the released semver tag, or "dev" for an unreleased build.
	Version = "dev"
	// Commit is the git SHA the binary was built from.
	Commit = "none"
	// Date is the RFC3339 build timestamp.
	Date = "unknown"
)

Values injected via -ldflags by GoReleaser. Defaults apply to `go build` and `go run`, which do not set them.

Functions

func IsRelease

func IsRelease() bool

IsRelease reports whether this binary came from a tagged release. The update check and its notice are suppressed when it does not.

Types

type Info

type Info struct {
	Version   string `json:"version" yaml:"version"`
	Commit    string `json:"commit" yaml:"commit"`
	Date      string `json:"date" yaml:"date"`
	GoVersion string `json:"goVersion" yaml:"goVersion"`
}

Info is the machine-readable form of the build metadata, used by `fft version --output json`.

func Current

func Current() Info

Current returns the build metadata for this binary.

Jump to

Keyboard shortcuts

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