Documentation
¶
Overview ¶
Package version is aviary's one version parser. It reads the version a CLI provider reports from `--version` and the release tags `aviary update` compares, so the doctor, the Code Loop minimum-version gate, and the updater never disagree about what a version is.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compare ¶
Compare orders two versions, returning -1, 0, or 1, and false when either of them carries no version. Components missing from the shorter version count as zero, so "1.2" and "1.2.0" are the same version.
func CompareReleases ¶
CompareReleases orders two release tags ParseRelease accepted.
func Find ¶
Find returns the dotted version text carries, such as "2.1.312" from "2.1.312 (Claude Code)", or "" when it carries none.
func Parse ¶
Parse reads the version in text, returning its numeric components. A prerelease or build suffix is ignored: it never makes a version older than the release it precedes by enough to matter here, and treating "1.2.0-beta.1" as unreadable would block a dispatch that works. ok is false when the text carries no version at all.
func ParseRelease ¶
ParseRelease reads a release tag, which has to be exactly X.Y.Z with an optional leading "v". A build that is not a clean release -- "dev", a commit hash, "1.2.3-dirty" -- is rejected, because the updater must never offer to replace one with a release it cannot be ordered against.
Types ¶
This section is empty.