Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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.
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.
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.