Documentation
¶
Overview ¶
Package build_info exposes ldflag-injected build metadata (Version, Commit, Date) and small derived helpers (IsDev, DocsURL) that depend on it.
Index ¶
Constants ¶
const (
DefaultDevVersion = "0.0.0-localdev"
)
Variables ¶
var ( Version = DefaultDevVersion Commit = "unknown" Date = "unknown" )
Build information variables - set via ldflags during build
Functions ¶
func DocsURL ¶ added in v0.8.0
func DocsURL() string
DocsURL returns the versioned documentation URL matching the running binary. Development builds resolve to the "dev" alias (tip of main); released builds resolve to the matching vX.Y.Z subdirectory.
func IsDev ¶ added in v0.8.0
func IsDev() bool
IsDev reports whether the binary is a development (non-released) build. Treats the Makefile default (DefaultDevVersion), the historical "dev" sentinel, and an unset Version all as development.
func IsDevVersion ¶ added in v0.8.7
IsDevVersion reports whether the given version string (e.g. a state file's kcp_build_info.version) is a development sentinel. Unlike IsDev(), it does not read the running binary's build_info.Version — it classifies the supplied value, which is what the state-migration engine needs (file-driven, never reader-driven; see the state backward-compatibility design §6.2/§6.9).
Types ¶
This section is empty.