Documentation ¶
Overview ¶
Package semver provides a set of utilities for working with semantic versions in Go.
Index ¶
Constants ¶
View Source
const ( RegexSemver = `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?(\+([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?$` RegexPreRelease = `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)` )
Variables ¶
This section is empty.
Functions ¶
func CompareRaw ¶
CompareRaw returns three values -1, 0, +1 -1 denotes ver1 < ver2 0 denotes invalid input +1 denotes ver1 > ver2
Types ¶
type SemVer ¶
type SemVer struct {
// contains filtered or unexported fields
}
func (*SemVer) Compare ¶
Compare returns three values -1, 0, +1 -1 denotes ver1 < ver2 0 denotes invalid input +1 denotes ver1 > ver2
func (*SemVer) IsPreRelease ¶
func (*SemVer) PreRelease ¶
Click to show internal directories.
Click to hide internal directories.