Documentation ¶
Index ¶
- func AtLeastAsImp(base *semver.Version, x *semver.Version) bool
- func Compare(i, j string) bool
- func CompareDesc(i, j string) bool
- func CompareVersions(vi *semver.Version, vj *semver.Version) bool
- func IsPrerelease(v string) bool
- func IsPublicRelease(v string) bool
- func SortVersions(versions []string, compare func(vi, vj string) bool) []string
- func VersionToRune(v *semver.Version) rune
- type SemverCollection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AtLeastAsImp ¶
func AtLeastAsImp(base *semver.Version, x *semver.Version) bool
func CompareDesc ¶
func CompareVersions ¶
func CompareVersions(vi *semver.Version, vj *semver.Version) bool
func IsPrerelease ¶
func IsPublicRelease ¶
func VersionToRune ¶
func VersionToRune(v *semver.Version) rune
Types ¶
type SemverCollection ¶
type SemverCollection []*semver.Version
SemverCollection is a collection of Version instances and implements the sort interface. See the sort package for more details. https://golang.org/pkg/sort/
func (SemverCollection) Len ¶
func (c SemverCollection) Len() int
Len returns the length of a collection. The number of Version instances on the slice.
func (SemverCollection) Less ¶
func (c SemverCollection) Less(i, j int) bool
Less is needed for the sort interface to compare two Version objects on the slice. If checks if one is less than the other.
func (SemverCollection) Swap ¶
func (c SemverCollection) Swap(i, j int)
Swap is needed for the sort interface to replace the Version objects at two different positions in the slice.
Click to show internal directories.
Click to hide internal directories.