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 specific 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.
Click to show internal directories.
Click to hide internal directories.