buildinfo

package
v1.170.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: Apache-2.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 holds the identity of the running binary: the version, commit and build date the release build stamps in through ldflags. It is the one place those values live, so the --version flag, the admin system route and the User-Agent an outbound request presents all report the same build.

It sits below every other package (it imports nothing first-party) because the outbound transport seam, internal/upstreamauth, needs the version and cannot import the server package that used to hold it.

Index

Constants

This section is empty.

Variables

View Source
var Commit = "none"

Commit is the git short commit hash, set at build time via ldflags.

View Source
var Date = "unknown"

Date is the build timestamp, set at build time via ldflags.

View Source
var Version = "dev"

Version is the release version, set at build time via ldflags. A build without one, such as `go run`, reports "dev".

Functions

func Build added in v1.166.2

func Build() string

Build is the identity the platform names itself by on every HTTP response and in the portal page it serves (#2727): the version and the commit, so two builds of one version from different commits (two dev builds) differ. A build that stamped no commit is its version alone. --version reports both halves.

Types

This section is empty.

Jump to

Keyboard shortcuts

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