Semantic Versions http://semver.org
Sort sorts the given slice of Version
Must is a helper for wrapping NewVersion and will panic if err is not nil.
BumpMajor increments the Major field by 1 and resets all other fields to their default values
BumpMinor increments the Minor field by 1 and resets all other fields to their default values
BumpPatch increments the Patch field by 1 and resets all other fields to their default values
Compare tests if v is less than, equal to, or greater than versionB, returning -1, 0, or +1 respectively.
Equal tests if v is equal to versionB.
LessThan tests if v is less than versionB.
vA := New("1.2.3") vB := New("3.2.1") fmt.Printf("%s < %s == %t\n", vA, vB, vA.LessThan(*vB))
1.2.3 < 3.2.1 == true
Set parses and updates v from the given version string. Implements flag.Value
Slice converts the comparable parts of the semver into a slice of integers.