constants

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GitCommit  = vcsUnknown
	CommitDate = vcsUnknown
	Dirty      bool
)

Build metadata is sourced from the Go toolchain's embedded VCS stamps, which `go build -buildvcs=true` records automatically — no ldflags, no shell git plumbing. GitCommit is the commit SHA, CommitDate the commit timestamp (RFC3339, and reproducible, unlike a wall-clock build date), and Dirty is whether the working tree had uncommitted changes at build time.

View Source
var BuildDate = vcsUnknown

BuildDate is the wall-clock time the binary was compiled, injected via ldflag:

-ldflags "-X 'github.com/ATMackay/checkout/constants.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ)'"

Unlike CommitDate (from VCS) it is not reproducible — it answers "when was this binary built", which the commit date cannot.

View Source
var Version = "0.0.0-dev"

Version is the semantic version. It defaults to a development placeholder and is overridden at build time via ldflag:

-ldflags "-X 'github.com/ATMackay/checkout/constants.Version=$(git describe --tags)'"

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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