buildinfo

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// These variables are replaced by ldflags at build time
	GitVersion = "v0.0.0-main"
	GitCommit  = "0000000"
	BuildTime  = "1970-01-01T00:00:00Z" // build date in ISO8601 format
)

Functions

This section is empty.

Types

type BuildInfo

type BuildInfo struct {
	GitVersion string `json:"gitVersion" doc:"The version of the Git repository"`
	GitCommit  string `json:"gitCommit" doc:"The Git commit hash"`
	BuildDate  string `json:"buildDate" doc:"The date and time of the build in ISO8601 format"`
	GoVersion  string `json:"goVersion" doc:"The version of Go used for compilation"`
	Compiler   string `json:"compiler" doc:"The compiler used for building"`
	Platform   string `json:"platform" doc:"The operating system and architecture"`
}

func Get

func Get() *BuildInfo

Get returns the overall codebase version. It's for detecting what code a binary was built from.

Jump to

Keyboard shortcuts

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