Documentation
¶
Overview ¶
Package version reports build identity for the mivia CLI.
Index ¶
Constants ¶
const Binary = "mivia"
Binary is the shipped CLI binary name.
const Product = "mivia"
Product is the human product name.
Variables ¶
var Commit = "unknown"
Commit is the short Git commit (git rev-parse --short HEAD) this binary was built from. Overridden at link time via -ldflags (see Makefile's VERSION_LDFLAGS); "unknown" means no provenance was injected, e.g. a plain `go build` outside the Makefile.
var Dirty = ""
Dirty reports whether the working tree had uncommitted changes when this binary was built. Overridden at link time via -ldflags; values are "clean" or "dirty" ("" when no provenance was injected).
var Version = "0.0.0-dev"
Version is the semantic version of the mivia binary. Overridden at link time in release builds via -ldflags.
Functions ¶
func JSONString ¶
func JSONString() string
JSONString renders the version information as a compact JSON object. Commit is omitted when empty or "unknown" (same condition as String()). Dirty is omitted when empty.
func String ¶
func String() string
String renders the --version line, e.g.
mivia 0.0.0-dev (commit abc1234, clean)
It degrades gracefully to a bare "mivia <version>" when Commit was not injected at link time, so output from a plain `go build` stays stable and the CLI always compiles regardless of -ldflags.
Types ¶
This section is empty.