semverutils

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare added in v0.9.0

func Compare(a, b string) int

func Latest added in v0.5.0

func Latest(vers []string) (string, error)

func MatchVersionStrings

func MatchVersionStrings(vers []string, constraints ...*semver.Constraints) (semver.Collection, error)

MatchVersionStrings returns an ordered list of versions filtered by the given constraints. If no constraints a given the complete list is returned. If one given version is no semver version it is ignored for the matching and an additional error describing the parsing errors is returned.

func MatchVersions

func MatchVersions(versions semver.Collection, constraints ...*semver.Constraints) semver.Collection

func SortVersions added in v0.5.0

func SortVersions(vers []string) error

Types

type VersionCache added in v0.5.0

type VersionCache map[string]*semver.Version

func (VersionCache) Compare added in v0.9.0

func (c VersionCache) Compare(a, b string) int

func (VersionCache) Get added in v0.5.0

func (c VersionCache) Get(v string) (*semver.Version, error)

Jump to

Keyboard shortcuts

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