semver

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrConstraintValidation added in v0.2.0

func ErrConstraintValidation(errors []error) error

func IsUpgradable

func IsUpgradable(installed, desired string) bool

IsUpgradable checks if desired is greater than installed, according to semver. As a fallback if either cannot be parsed as semver, it returns whether they are different. Am important deviation from the semver standard is that this function DOES try to interpret the version metadata as a number when comparing.

func IsVersionUpgradable added in v0.2.0

func IsVersionUpgradable(installed, desired *semver.Version) bool

func ValidateConstraint added in v0.2.0

func ValidateConstraint(version, constraint string) error

func ValidateVersionConstraint added in v0.2.0

func ValidateVersionConstraint(version *semver.Version, constraint *semver.Constraints) error

Types

type ConstraintValidationError added in v0.2.0

type ConstraintValidationError []error

func (*ConstraintValidationError) Error added in v0.2.0

func (err *ConstraintValidationError) Error() string

func (*ConstraintValidationError) Is added in v0.2.0

func (err *ConstraintValidationError) Is(other error) bool

func (*ConstraintValidationError) Unwrap added in v0.2.0

func (err *ConstraintValidationError) Unwrap() []error

Jump to

Keyboard shortcuts

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