version

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package version reports build identity for the mivia CLI.

Index

Constants

View Source
const Binary = "mivia"

Binary is the shipped CLI binary name.

View Source
const Product = "mivia"

Product is the human product name.

Variables

View Source
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.

View Source
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).

View Source
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.

Jump to

Keyboard shortcuts

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