Documentation ¶
Index ¶
- Variables
- type Version
- func (v *Version) Compare(o *Version) int
- func (v *Version) Greater(o *Version) bool
- func (v *Version) GreaterOrEqual(o *Version) bool
- func (v *Version) InRange(s, e *Version) bool
- func (v *Version) Less(o *Version) bool
- func (v *Version) LessOrEqual(o *Version) bool
- func (v *Version) Validate() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidSemVer is returned if a version can not be parsed ErrInvalidSemVer = errors.New("invalid semantic version") // ErrUnsupportedVer is returned if a version out of supported range ErrUnsupportedVer = errors.New("the version is out of supported range") )
Functions ¶
This section is empty.
Types ¶
type Version ¶
type Version struct {
Major, Minor uint64
}
func (*Version) Compare ¶
Compare compares this version to another one. It returns -1, 0, or 1 if the version smaller, equal, or larger than the other version.
func (*Version) GreaterOrEqual ¶
GreaterOrEqual tests if one version is greater than another one or equal
func (*Version) LessOrEqual ¶
LessOrEqual tests if one version is less than another one or equal
Click to show internal directories.
Click to hide internal directories.