Documentation
¶
Index ¶
- type AscSorting
- type VerSegComp
- type VerSegCompInt
- type VerSegCompStr
- type Version
- func (v Version) AsString() string
- func (v Version) Compare(other Version) int
- func (v Version) Empty() bool
- func (v Version) IncrementPostRelease(defaultPostRelease VersionSegment) (Version, error)
- func (v Version) IncrementRelease() (Version, error)
- func (v Version) IsEq(other Version) bool
- func (v Version) IsGt(other Version) bool
- func (v Version) IsLt(other Version) bool
- func (v Version) String() string
- type VersionSegment
- func (s VersionSegment) AsString() string
- func (s VersionSegment) Compare(other VersionSegment) int
- func (s VersionSegment) Copy() VersionSegment
- func (s VersionSegment) Empty() bool
- func (s VersionSegment) Increment() (VersionSegment, error)
- func (s VersionSegment) IsEq(other VersionSegment) bool
- func (s VersionSegment) IsGt(other VersionSegment) bool
- func (s VersionSegment) IsLt(other VersionSegment) bool
- func (s VersionSegment) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AscSorting ¶
type AscSorting []Version
func (AscSorting) Len ¶
func (s AscSorting) Len() int
func (AscSorting) Less ¶
func (s AscSorting) Less(i, j int) bool
func (AscSorting) Swap ¶
func (s AscSorting) Swap(i, j int)
type VerSegComp ¶
type VerSegComp interface { Validate() error // Compare should panic if incompatible interface is given Compare(VerSegComp) int AsString() string }
type VerSegCompInt ¶
type VerSegCompInt struct{ I int }
func NewVerSegCompIntFromString ¶
func NewVerSegCompIntFromString(piece string) (VerSegCompInt, bool, error)
func (VerSegCompInt) AsString ¶
func (i VerSegCompInt) AsString() string
func (VerSegCompInt) Compare ¶
func (i VerSegCompInt) Compare(other VerSegComp) int
func (VerSegCompInt) String ¶
func (i VerSegCompInt) String() string
func (VerSegCompInt) Validate ¶
func (i VerSegCompInt) Validate() error
type VerSegCompStr ¶
type VerSegCompStr struct{ S string }
func NewVerSegCompStrFromString ¶
func NewVerSegCompStrFromString(piece string) (VerSegCompStr, bool)
func (VerSegCompStr) AsString ¶
func (s VerSegCompStr) AsString() string
func (VerSegCompStr) Compare ¶
func (s VerSegCompStr) Compare(other VerSegComp) int
func (VerSegCompStr) String ¶
func (s VerSegCompStr) String() string
func (VerSegCompStr) Validate ¶
func (s VerSegCompStr) Validate() error
type Version ¶
type Version struct {
Release, PreRelease, PostRelease VersionSegment
Segments []VersionSegment
}
func NewVersion ¶
func NewVersion(release, preRelease, postRelease VersionSegment) (Version, error)
func NewVersionFromString ¶
func (Version) IncrementPostRelease ¶
func (v Version) IncrementPostRelease(defaultPostRelease VersionSegment) (Version, error)
func (Version) IncrementRelease ¶
type VersionSegment ¶
type VersionSegment struct {
Components []VerSegComp
}
func MustNewVersionSegmentFromString ¶
func MustNewVersionSegmentFromString(v string) VersionSegment
func NewVersionSegment ¶
func NewVersionSegment(components []VerSegComp) (VersionSegment, error)
func NewVersionSegmentFromString ¶
func NewVersionSegmentFromString(v string) (VersionSegment, error)
func (VersionSegment) AsString ¶
func (s VersionSegment) AsString() string
func (VersionSegment) Compare ¶
func (s VersionSegment) Compare(other VersionSegment) int
func (VersionSegment) Copy ¶
func (s VersionSegment) Copy() VersionSegment
func (VersionSegment) Empty ¶
func (s VersionSegment) Empty() bool
func (VersionSegment) Increment ¶
func (s VersionSegment) Increment() (VersionSegment, error)
func (VersionSegment) IsEq ¶
func (s VersionSegment) IsEq(other VersionSegment) bool
func (VersionSegment) IsGt ¶
func (s VersionSegment) IsGt(other VersionSegment) bool
func (VersionSegment) IsLt ¶
func (s VersionSegment) IsLt(other VersionSegment) bool
func (VersionSegment) String ¶
func (s VersionSegment) String() string
Click to show internal directories.
Click to hide internal directories.