Documentation
¶
Overview ¶
Package version reports the build version shared by every clank binary.
Index ¶
Constants ¶
View Source
const Unknown = "unknown"
Unknown is what String reports when neither ldflags nor Go's build info carry a version (e.g. binaries built with -buildvcs=false outside a module).
Variables ¶
View Source
var String = sync.OnceValue(func() string { if Version != "" { return Version } info, ok := debug.ReadBuildInfo() if !ok { return Unknown } return fromBuildInfo(info) })
String returns the ldflags-stamped Version, or the main-module version Go recorded at build time (a tag or pseudo-version, "+<rev>" appended when a VCS revision is known), or Unknown.
View Source
var Version string
Version is stamped by the release pipeline via -ldflags "-X github.com/supaclank/clank/internal/version.Version=v1.2.3". Empty for `go build`/`go install` builds, which report Go's own VCS stamp instead (see String).
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.