Documentation
¶
Overview ¶
Package version carries the project's version.
The semantic version is the Version const and changes only in source (a release tool such as release-please bumps it). BuildMetadata is the semver "+build" suffix, injected at link time by internal/buildrun via -ldflags "-X". Every component that should report its version must import this package: an -X naming a package the binary does not link is silently discarded.
Index ¶
Constants ¶
const Version = "0.2.0"
Version is the semantic version, without a leading "v".
Variables ¶
var BuildMetadata string
BuildMetadata is set at link time (e.g. "pr45.abc1234", "local.abc1234.dirty"). Empty under `go run`.
var ImportPath = reflect.TypeFor[marker]().PkgPath()
ImportPath is this package's import path — the -X target for BuildMetadata. Derived rather than written as a string literal so it survives a module rename (gonew rewrites imports, not string constants).
Functions ¶
Types ¶
This section is empty.