version

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   string = "1.3.6"
	Commit    string = "unknown"
	BuildDate string = "unknown"
)

Version, Commit, and BuildDate are set via ldflags at build time.

go build -ldflags "-X nself/internal/version.Version=1.0.0 -X nself/internal/version.Commit=abc123 -X nself/internal/version.BuildDate=2026-01-01"

Functions

func GetBuildDate

func GetBuildDate() string

GetBuildDate returns the build date.

func GetCommit

func GetCommit() string

GetCommit returns the git commit hash.

func GetVersion

func GetVersion() string

GetVersion returns the build version string.

func NextMinor added in v1.3.0

func NextMinor(v string) string

NextMinor returns the next minor release version (patch reset to 0) for a "X.Y.Z" version string, e.g. "1.2.7" -> "1.3.0". Used for escape-hatch removal-version messaging such as NSELF_LEGACY_ENV_ORDER (CLI-R18), which is honored for exactly one minor version. Returns v unchanged if it cannot be parsed as three dot-separated integers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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