build_info

package
v0.8.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

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

View Source
const (
	DefaultDevVersion = "0.0.0-localdev"
)

Variables

View Source
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

func IsDevVersion(v string) bool

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL