Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Nil = Version{
Major: -1,
Minor: -1,
Patch: -1,
}
Functions ¶
This section is empty.
Types ¶
type ComparatorList ¶
type ComparatorList []Comparator
ComparatorList will pass when all of the ranges passed
func (ComparatorList) Contains ¶
func (rs ComparatorList) Contains(v Version) bool
func (ComparatorList) String ¶
func (rs ComparatorList) String() string
type ComparatorSet ¶
type ComparatorSet []Comparator
ComparatorSet will pass if any of the ranges passed
func ParseComparatorSet ¶
func ParseComparatorSet(s string) (rs ComparatorSet, err error)
func (ComparatorSet) Contains ¶
func (rs ComparatorSet) Contains(v Version) bool
func (*ComparatorSet) MarshalJSON ¶
func (rs *ComparatorSet) MarshalJSON() ([]byte, error)
func (ComparatorSet) String ¶
func (rs ComparatorSet) String() string
func (*ComparatorSet) UnmarshalJSON ¶
func (rs *ComparatorSet) UnmarshalJSON(data []byte) (err error)
type Requirement ¶
func (*Requirement) Contains ¶
func (r *Requirement) Contains(v Version) bool
func (*Requirement) String ¶
func (r *Requirement) String() string
type Version ¶
A [vaild semver](https://semver.org/#backusnaur-form-grammar-for-valid-semver-versions) can be parsed to Version Version also can parse from some partially missing semver, to allow reuse when parsing version range
func (Version) IsValid ¶
IsValid check if the version is a valid semver or not See: <https://semver.org/#backusnaur-form-grammar-for-valid-semver-versions>
func (Version) MarshalJSON ¶
func (*Version) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.