semver

package
v0.0.0-...-8114a04 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(v1, v2 string) int

func MajorMinor

func MajorMinor(version string) string

func MatchMinimumVersion

func MatchMinimumVersion(installed, minimum string) bool

func MatchVersionConstraint

func MatchVersionConstraint(installed, required string) bool

MatchVersionConstraint supported operators: >=, >, <=, <, ^, ~, wildcards (*, x), OR (||), AND (space or comma), hyphen ranges

func ParseVersionPin

func ParseVersionPin(pin string) string

func ValidateVersion

func ValidateVersion(installedVersion, requiredVersion string) (bool, string)

Types

type VersionParts

type VersionParts struct {
	Major      int
	Minor      int
	Patch      int
	Prerelease string
	Build      string
}

func ParseVersion

func ParseVersion(version string) *VersionParts

Jump to

Keyboard shortcuts

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