buildinfo

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: AGPL-3.0 Imports: 0 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 the build-time identity of this binary to packages that cannot import cmd.

The values are injected into cmd by ldflags at five build sites, and cmd copies them here during init. Packages below cmd — internal/cdx builds the metadata.tools entry, and it must name a real version — read them from here.

The alternative was threading a version string through every constructor that eventually reaches a BOM, which is how four builders came to default it to the literal string "cli".

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "0.0.0-unknown"
	Commit    = ""
	BuildDate = ""
)

Version is the release this binary was built from. The default is what an unstamped build reports; it is a parseable version rather than a placeholder word, so a consumer comparing versions gets an answer instead of an error.

Functions

func Set

func Set(version, commit, buildDate string)

Set records the build identity. cmd calls it during init; nothing else should.

Types

This section is empty.

Jump to

Keyboard shortcuts

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