buildinfo

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 3 Imported by: ? 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 is the single source of a running binary's build identity: a human-readable version label plus the embedded git commit, build time, and dirty flags. It is a leaf package (no spacemolt imports) so every binary can import it cheaply.

This SemVer axis tracks fleet *binary* builds. It is deliberately separate from pkg/version (VersionID, BuiltForAPIVersion), which tracks the game-server API the client targets. The two are not unified.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Version   string    // git describe label, module pseudo-version, or "dev"
	Commit    string    // short vcs.revision, "" if unavailable
	BuiltAt   time.Time // vcs.time, zero if unavailable
	Modified  bool      // raw vcs.modified — cosmetic only (noisy from data/*.json)
	CodeDirty bool      // uncommitted tracked code outside data/ — color-relevant
}

Info identifies the binary that is running.

func Get

func Get() Info

Get returns the running binary's build identity. It reads runtime/debug.ReadBuildInfo once, memoizes the result, and never panics.

Jump to

Keyboard shortcuts

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