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 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 according to the expected format: "MAJOR.MINOR.PATCH" or "MAJOR.MINOR" each component being a non-negative number
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