version

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 3 Imported by: 0

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

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

Jump to

Keyboard shortcuts

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