versionhelpers

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constraints

type Constraints struct {
	Original string
	// contains filtered or unexported fields
}

Constraints wraps semver.Constraints type, adding the Original property

func NewConstraint

func NewConstraint(c string) (*Constraints, error)

func (Constraints) Check

func (c Constraints) Check(v *semver.Version) bool

Check tests if a version satisfies the constraints.

func (Constraints) Equals

func (c Constraints) Equals(other *Constraints) bool

func (Constraints) IsPrerelease

func (c Constraints) IsPrerelease() bool

IsPrerelease determines whether the constraint parses as a specifc version with prerelease or metadata set

func (Constraints) Validate

func (c Constraints) Validate(v *semver.Version) (bool, []error)

Validate checks if a version satisfies a constraint. If not a slice of reasons for the failure are returned in addition to a bool.

Jump to

Keyboard shortcuts

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