buildinfo

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 1 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 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