version

package
v0.8.61 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const APIVersion = 1

APIVersion is the daemon's HTTP API contract version. Bump it on any backwards-incompatible change to request/response shapes or routes (additive optional fields don't count). The client compares its compiled-in value to the daemon's reported value to detect skew instead of silently degrading.

Variables

View Source
var Version = "dev"

Version is the semver build version, set at build time via -ldflags. "dev" (or a git-describe string) for un-tagged local builds.

Functions

func Compare

func Compare(a, b string) int

Compare returns -1, 0, or +1 comparing two semver strings (a leading 'v' and any -prerelease/+build suffix are ignored). Non-semver inputs ("dev", hashes) sort below any real release and compare equal to each other — callers should treat an unknown-vs-unknown 0 as "can't tell".

func IsExactRelease added in v0.8.61

func IsExactRelease(v string) bool

IsExactRelease reports whether v is a clean release tag — vX.Y.Z with no -prerelease/+build suffix — and so names a real published release. Use this (not IsRelease) whenever the version has to resolve to a downloadable asset or a git tag: "v0.8.60-3-gabc1234" is three commits PAST v0.8.60 and no release by that name exists, so fetching it 404s.

func IsRelease

func IsRelease(v string) bool

IsRelease reports whether v carries a usable semver core (vX.Y.Z), as opposed to "dev". Deliberately LENIENT: parseSemver drops any -prerelease/+build suffix, so a git-describe string like "v0.8.60-3-gabc1234" also passes. That's what comparison callers want — such a build really is "at least v0.8.60" for skew checks. Callers that need a version to name a PUBLISHED artifact (a release asset to download) must use IsExactRelease instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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