Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type V ¶
type V struct { Major int Minor int Bugfix int Meta string // contains filtered or unexported fields }
func MustNew ¶
MustNew creates a version from the given version string. If the version string is invalid, MustNew panics.
func (*V) IsValid ¶
IsValid returns true if the version object stores a successfully parsed version number.
func (*V) LessThan ¶
LessThan returns true if v is strictly smaller than v1. When comparing, the major, minor and bugfix numbers are compared in order. The meta part is not taken into account.
func (*V) LessThanMajorMinor ¶
LessThanMajorMinor returns true if v is smaller or equal to v1 based on the major and minor version. The bugfix version and meta part are not taken into account. minor numbers are compared in order. The and bugfix version and meta part is not taken into account.
func (*V) LessThanOrEqual ¶
LessThan returns true if v is strictly smaller than v1. When comparing, the major, minor, bugfix and pre-release numbers are compared in order.
func (*V) UnmarshalJSON ¶
UnmarshalJSON unmarshals a JSON string version representation into a Version struct Implements https://golang.org/pkg/encoding/json/#Unmarshaler