Documentation ¶
Index ¶
- func ErrConstraintValidation(errors []error) error
- func IsUpgradable(installed, desired string) bool
- func IsVersionUpgradable(installed, desired *semver.Version) bool
- func ValidateConstraint(version, constraint string) error
- func ValidateVersionConstraint(version *semver.Version, constraint *semver.Constraints) error
- type ConstraintValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrConstraintValidation ¶ added in v0.2.0
func IsUpgradable ¶
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 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
Click to show internal directories.
Click to hide internal directories.