Documentation
¶
Overview ¶
Package semver reads semantic versions and compares them by semantic versioning's precedence: MAJOR.MINOR.PATCH, with an optional prerelease (-rc.1) and build metadata (+build.5), with or without a leading v. The integrations compare the tools' versions with it, and the app's updates compare a release's version with the running build's.
It is a leaf: it imports nothing of the app's.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
Version is a parsed MAJOR.MINOR.PATCH[-PRE][+BUILD] version. Build metadata is dropped, since it never changes precedence.
func Parse ¶
Parse reads a version, with or without a leading v; ok is false when it isn't one. It holds to semantic versioning 2.0: each prerelease and build identifier is a non-empty run of ASCII letters, digits, and hyphens, and a numeric prerelease identifier has no leading zero (rc.1, never rc.01).
func (Version) Prerelease ¶
Prerelease reports whether v has a prerelease part, as 0.3.0-rc.1 has.