Skip to main content

Module version

Module version 

Source
Expand description

Semver comparison utilities for tool version checks.

Ported from internal/version/version.go. Go’s implementation defers parsing and comparison to golang.org/x/mod/semver. Rather than pull in a new semver-crate dependency for a check that only ever compares major.minor, this port hand-rolls the narrow slice of golang.org/x/mod/semver’s behavior the Go original actually uses: IsValid, MajorMinor, and Compare restricted to major/minor.

Enums§

VersionError
Ported from ErrVersionTooOld and ErrInvalidVersion.

Functions§

check_minimum_version
Ported from CheckMinimumVersion. Compares the major.minor of installed against required. Version strings are normalized: tool-name prefixes (e.g. "mirrord 3.187.0") and "v" prefixes are handled automatically.