version

package
v1.0.39 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func Compare(a, b string) (int, bool)

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

func CompareReleases(a, b []int) int

CompareReleases orders two release tags ParseRelease accepted.

func Find

func Find(text string) string

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

func Parse(text string) ([]int, bool)

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

func ParseRelease(raw string) ([]int, error)

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.

Jump to

Keyboard shortcuts

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