Documentation ¶
Index ¶
- type Version
- func (v *Version) Compare(v2 *Version) int
- func (v *Version) CompareBuildMetadata(v2 *Version) int
- func (v *Version) Equal(v2 *Version) bool
- func (v *Version) GreaterThan(v2 *Version) bool
- func (v *Version) LessThan(v2 *Version) bool
- func (v *Version) SameMajor(v2 *Version) bool
- func (v *Version) SameMinor(v2 *Version) bool
- func (v *Version) SamePatch(v2 *Version) bool
- func (v *Version) SamePrerelease(v2 *Version) bool
- func (v *Version) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Version ¶
func (*Version) CompareBuildMetadata ¶ added in v0.19.0
CompareBuildMetadata compares the build metadata of v and v2. The metadata is split in its identifiers and these compared one by one. Number identifiers are considered lower than strings. If one build metadata is a prefix of the other, the longer one is considered greater. -1 == v is less than v2. 0 == v is equal to v2. 1 == v is greater than v2. 2 == v is different than v2 (it is not possible to identify if lower or greater).
func (*Version) GreaterThan ¶ added in v0.6.1
func (*Version) SamePrerelease ¶
Click to show internal directories.
Click to hide internal directories.