Documentation ¶
Overview ¶
Package semver provides a model and functions for working with semantic versions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Version ¶
type Version struct {
Major, Minor, Patch int
}
Version represents a very simple semantic version that consists of three parts: major, minor, and patch and represents them separated by periods.
func Parse ¶
Parse parses a version from a string. It matches a very simple regexp in the string and is very lenient. If no version text found, the version will be 0.0.0.
func (*Version) Compare ¶
Compare returns a value less than 0 if v1 < v2, 0 if v1 == v2, and greater than 0 if v1 > v2
Click to show internal directories.
Click to hide internal directories.