Documentation ¶
Index ¶
- Variables
- func NewBuildVersion(s string) (string, error)
- func Sort(versions []Version)
- type PRVersion
- type Version
- func (v Version) Compare(o Version) int
- func (v Version) EQ(o Version) bool
- func (v Version) Equals(o Version) bool
- func (v Version) GE(o Version) bool
- func (v Version) GT(o Version) bool
- func (v Version) GTE(o Version) bool
- func (v Version) LE(o Version) bool
- func (v Version) LT(o Version) bool
- func (v Version) LTE(o Version) bool
- func (v Version) MarshalJSON() ([]byte, error)
- func (v Version) NE(o Version) bool
- func (v *Version) Scan(src interface{}) (err error)
- func (v Version) String() string
- func (v *Version) UnmarshalJSON(data []byte) (err error)
- func (v Version) Validate() error
- func (s Version) Value() (driver.Value, error)
- type Versions
Constants ¶
This section is empty.
Variables ¶
View Source
var SPEC_VERSION = Version{
Major: 2,
Minor: 0,
Patch: 0,
}
Latest fully supported spec version
Functions ¶
func NewBuildVersion ¶
Creates a new valid build version
Types ¶
type PRVersion ¶
PreRelease Version
func NewPRVersion ¶
Creates a new valid prerelease version
type Version ¶
type Version struct { Major uint64 Minor uint64 Patch uint64 Pre []PRVersion Build []string //No Precendence }
func (Version) Compare ¶
Compares Versions v to o: -1 == v is less than o 0 == v is equal to o 1 == v is greater than o
func (Version) MarshalJSON ¶
MarshalJSON implements the encoding/json.Marshaler interface.
func (*Version) UnmarshalJSON ¶
UnmarshalJSON implements the encoding/json.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.