version

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Spec = "0.4.0"

Spec is the Agent CLI Guidelines version this tool conforms to (declared in `schema`).

Variables

This section is empty.

Functions

func Latest added in v0.2.0

func Latest(ctx context.Context) (string, error)

Latest returns the latest released version tag (from GitHub Releases by default). Network, short timeout, **fail-silent**: returns ("", err) on any problem so a `version --check` never errors or blocks an agent loop. The release source can be overridden with VABC_RELEASES_URL (used in tests); a disallowed value is ignored.

func String

func String() string

String returns the build version, falling back to VCS build info for `go install` (which does not run ldflags).

func UpdateAvailable added in v0.2.0

func UpdateAvailable(latest, current string) bool

UpdateAvailable reports whether latest is a different release than current. Dev/source builds (current == "dev") never report an update — don't nag them.

func UpgradeHint added in v0.2.0

func UpgradeHint() string

UpgradeHint returns the recommended upgrade command for this tool. The main package lives at ./cmd/<tool> (the scaffold layout), so the install path includes /cmd/<tool> — a bare module@latest would fail for tools with no root main.

Types

This section is empty.

Jump to

Keyboard shortcuts

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