version

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package version compares dotted semantic-version strings (major.minor.patch). It is deliberately tiny and dependency-free so both the API update check and the CLI self-upgrade can share one comparator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Less

func Less(a, b string) bool

Less reports whether a is strictly older than b. Unparseable versions are treated as not-older, so a "dev" build never compares as outdated.

func Parse

func Parse(s string) ([3]int, bool)

Parse returns the major.minor.patch of a version string. A leading "v" and any "-pre"/"+build" suffix are ignored. ok is false for unparseable input (e.g. "dev").

Types

This section is empty.

Jump to

Keyboard shortcuts

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