version

package
v0.6.1 Latest Latest
Warning

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

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

Documentation

Overview

Package version exposes the running binary's semver to other packages without dragging in a dependency on cmd/bones. main.go sets it via Set() at startup; everything else calls Get().

The default ("dev") is what unset GoReleaser ldflags produce, so development builds and tests see a stable value. Drift checks treat "dev" specially — they do not warn against "dev" because the workspace stamp would always look stale during local hacking.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get() string

Get returns the running binary's version, or "dev" if Set was never called.

func IsDev

func IsDev() bool

IsDev reports whether the running binary is an unstamped build (Set was never called or was called with "dev"). Drift checks suppress warnings against dev binaries.

func Set

func Set(v string)

Set records the running binary's version. Called once from cmd/bones/main.go after ldflags-injected globals are read. Callers other than main should not invoke this.

Types

This section is empty.

Jump to

Keyboard shortcuts

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