Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var UnknownVersion = Version{}
UnknownVersion is just a version that is not set
Functions ¶
This section is empty.
Types ¶
type Version ¶
Version represents a software version composed of
func GetLatestVersion ¶ added in v2.9.2
func ParseVersion ¶
ParseVersion takes a version as string and tries to parse it to convert it to a Version value. It returns the Version value and possibly an error if the string could not be parsed. Expected formats are "MAJOR", "MAJOR.MINOR" or "MAJOR.MINOR.PATCH" with each component being a non-negative number. Omitted minor or patch versions are interpreted as 0, so "2" is interpreted as 2.0.0 and "2.1" is interpreted as 2.1.0.
func (Version) GreaterThan ¶
GreaterThan determines whether this version is greater than the other version
func (Version) Invalid ¶
Invalid returns whether this version is valid or not. A version is considered to be "invalid" if it is equal to "0.0.0" or contains a negative number, e.e. "0.-1.2"
func (Version) SmallerThan ¶
SmallerThan determines whether this version is smaller than the given version