buildinfo

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package buildinfo reports build and version information for the running binary, sourced from Go's embedded build metadata with optional overrides injected at link time:

go build -ldflags "-X riverqueue.com/riverui/internal/buildinfo.version=v1.2.3 ..."

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Version   string
	Revision  string
	Time      string
	Modified  bool
	GoVersion string
}

Info describes the running binary's build.

func Get

func Get() *Info

Get returns build information for the running binary, preferring link-time overrides and falling back to the metadata Go embeds via runtime/debug.ReadBuildInfo (module version plus vcs.revision, vcs.time, and vcs.modified when built with VCS stamping). Time is the commit time, not the time the binary was built. When River UI is embedded, this describes the host executable.

Source Files

  • buildinfo.go

Jump to

Keyboard shortcuts

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