Documentation
¶
Overview ¶
Package buildinfo reports the version, commit and build time of the running binary, from Go build information or a version set at link time.
Set an explicit version when building:
go build -ldflags "-X gorbital.dev/buildinfo.version=v1.2.3" ./cmd/api
Stability: stable (ADR-0015, ADR-0054).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Info ¶
type Info struct {
Version string `json:"version" example:"v1.2.3"`
Commit string `json:"commit,omitempty" example:"3f9a1c2b7d4e"`
BuildTime string `json:"build_time,omitempty" example:"2026-09-14T12:00:00Z"`
Modified bool `json:"modified,omitempty"`
GoVersion string `json:"go_version" example:"go1.25.3"`
}
Info describes the running binary.
Click to show internal directories.
Click to hide internal directories.