Documentation
¶
Overview ¶
Package version exposes the build-time version of typeburn.
Version, Commit and Date are injected by the linker via
-ldflags "-X github.com/bavanchun/Typeburn/internal/version.Version=..."
(wired in the Makefile and .goreleaser.yaml). When they are not set — for example after `go install github.com/bavanchun/Typeburn@v1.0.0`, which applies no ldflags — Resolve falls back to the module build information the Go toolchain embeds in every binary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Version string Commit string Date string )
ldflags-injection targets. Keep these as plain package-level string vars: the linker's -X only rewrites simple string variables.
Functions ¶
Types ¶
type Info ¶
Info is a fully resolved version triple ready for display.
func Resolve ¶
func Resolve() Info
Resolve returns the effective version information.
Precedence: ldflags-injected values win. Any field left empty is filled from debug.ReadBuildInfo() — Main.Version for the version (ignoring the synthetic "(devel)"), and the vcs.revision / vcs.time build settings for commit/date. If the version is still unknown the final fallback is "dev". It never panics.