Documentation
¶
Overview ¶
Package version exposes the build-time version stamp consumed by both shardflow (CLI/TUI) and shardflowd (daemon) for their --version output. The fields are set via -ldflags at build time:
go build -ldflags "-X github.com/hett-patell/ShardFlow/internal/version.Version=v0.2.0 \
-X github.com/hett-patell/ShardFlow/internal/version.Commit=$(git rev-parse --short HEAD) \
-X github.com/hett-patell/ShardFlow/internal/version.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
./cmd/shardflow ./cmd/shardflowd
Defaults are sensible for source-tree builds (`go build`, `go run`) so a developer running locally without -ldflags gets "(devel)" instead of an empty string — useful when grepping for stale builds in journald.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Version = "(devel)" Commit = "" BuildDate = "" )
Defaults are placeholders; release builds override via -ldflags.
Functions ¶
func String ¶
func String() string
String returns a single-line version banner. Falls back to runtime/debug build-info (Go 1.18+ embeds the VCS commit automatically when building from a tagged Git checkout), so `go install ./...` without -ldflags still produces a useful version string instead of "(devel) unknown".
Types ¶
This section is empty.