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§
- Version
Error - Ported from
ErrVersionTooOldandErrInvalidVersion.
Functions§
- check_
minimum_ version - Ported from
CheckMinimumVersion. Compares the major.minor ofinstalledagainstrequired. Version strings are normalized: tool-name prefixes (e.g."mirrord 3.187.0") and"v"prefixes are handled automatically.