buildinfo

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package buildinfo carries the version string of the running binary.

The release path stamps Version at link time:

-X github.com/appshapes/brigade/internal/buildinfo.Version=0.1.0

`go install github.com/appshapes/brigade/cmd/brigade@v0.1.0` applies no ldflags, so Version is empty there and String falls back to the module version recorded by the toolchain in the binary's build info.

Index

Constants

View Source
const Unknown = "unknown"

Unknown is reported when neither the link-time stamp nor the embedded build info names a version — a plain `go build` with -buildvcs=false, or `go run`.

Variables

View Source
var Version string

Version is set at link time by the -X flag above. It is deliberately a plain var and not a const: a const would be inlined and -X could not reach it.

Functions

func String

func String() string

String reports the binary's version. It never returns the empty string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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