buildinfo

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "dev"
	Commit  = "none"
	Date    = "unknown"
)

Set by GoReleaser (and the Makefile) via -ldflags. Unstamped builds (`go run`, `go test`) keep these defaults; no VCS probing at runtime.

Functions

This section is empty.

Types

type Info added in v1.0.2

type Info struct {
	Version   string `json:"version"`
	Commit    string `json:"commit"`
	Date      string `json:"date"`
	GoVersion string `json:"go_version"`
	Dirty     bool   `json:"dirty,omitempty"`
}

Info is the JSON shape of GET /api/version.

func Snapshot added in v1.0.2

func Snapshot() Info

Snapshot returns the process identity from ldflags plus the Go runtime version. Dirty is true when Version was stamped with git describe --dirty.

Jump to

Keyboard shortcuts

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