Documentation
¶
Overview ¶
Package version exposes the build-time metadata of the tyche binary.
The values are set via -ldflags="-X" at link time. The defaults (used during `go run` or `go test`) are "dev" for the version and the current commit is empty; the Makefile or release pipeline populates them.
Example:
go build -ldflags "\
-X github.com/webdeveloperben/tyche/internal/version.Version=1.2.3 \
-X github.com/webdeveloperben/tyche/internal/version.Commit=$(git rev-parse HEAD) \
-X github.com/webdeveloperben/tyche/internal/version.Date=$(date -u +%Y-%m-%dT%H:%M:%SZ) \
-X github.com/webdeveloperben/tyche/internal/version.BuiltBy=release-please" \
-o ./bin/tyche ./cmd/tyche
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "dev" Commit = "" Date = "" BuiltBy = "source" )
These variables are overridden at link time. The defaults let `go run` and `go test ./...` produce a usable `tyche version` output without flags.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.