Documentation
¶
Overview ¶
Package version exposes build-time identity information about the vinculum binary.
Version is typically injected at build time via:
go build -ldflags="-X github.com/tsarna/vinculum/version.Version=v1.2.3"
Commit, BuildTime, and Modified are populated automatically from runtime/debug VCS stamping when available (i.e. when built from a git checkout with the .git directory present). Docker builds don't have access to .git, so the Dockerfiles inject all fields explicitly via ldflags instead.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BuildTime = ""
BuildTime is the build/commit timestamp in RFC3339 format, or empty if unknown.
var Commit = ""
Commit is the git commit SHA, or empty if unknown.
var Modified = false
Modified is true if the working tree had uncommitted changes at build time.
var Version = "dev"
Version is the release tag. Defaults to "dev" for local builds.
Functions ¶
func ShortCommit ¶
func ShortCommit() string
ShortCommit returns the first 12 characters of Commit, or Commit if shorter.
Types ¶
This section is empty.