Documentation
¶
Overview ¶
Package version holds the build identity, stamped at link time by the release build:
go build -ldflags "-X github.com/offsetsecurity/cipherhorizon/internal/version.Version=1.2.3 \ -X github.com/offsetsecurity/cipherhorizon/internal/version.Commit=abc1234 \ -X github.com/offsetsecurity/cipherhorizon/internal/version.Date=2026-01-02T03:04:05Z" ./cmd/cipherhorizon
A plain "go build" or "go install ...@vX.Y.Z" leaves the variables at their defaults; Info then falls back to what the Go toolchain embedded, so those builds still identify themselves.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Commit = ""
Commit is the source revision the binary was built from, when known.
var Date = ""
Date is the build time (RFC 3339, UTC), when known. Release builds take it from the commit, not the clock, so a rebuilt tag is byte-identical.
var Version = "0.0.0-dev"
Version is the program version (SemVer, without a leading "v"). "0.0.0-dev" marks an unstamped build.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
Version string `json:"version"`
Commit string `json:"commit,omitempty"`
Date string `json:"date,omitempty"`
GoVersion string `json:"goVersion"`
Platform string `json:"platform"`
}
Info is the build identity shown by "cipherhorizon version" and recorded in reports.