Documentation ¶
Index ¶
- func ChannelFromCalverOrSemver(v Version) string
- func Compare(x Version, y Version) int
- func IsCalVer(v Version) bool
- type InvalidVersionError
- type Version
- func (v Version) Equal(other Version) bool
- func (v Version) Increment(t time.Time) Version
- func (v Version) MarshalJSON() ([]byte, error)
- func (v Version) Newer(other Version) bool
- func (v Version) Older(other Version) bool
- func (v Version) SignificantlyBehind(latest Version) bool
- func (v Version) String() string
- func (v *Version) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChannelFromCalverOrSemver ¶ added in v0.1.112
func Compare ¶
Compare returns
-1 if x is less than y, 0 if x equals y, +1 if x is greater than y.
Versions with channels are considered less than versions without channels, as per semver spec. If both versions have channels, they are compared as strings. A channel of "stable" is greater than any other channel.
Types ¶
type InvalidVersionError ¶
type InvalidVersionError struct {
// contains filtered or unexported fields
}
func (*InvalidVersionError) Error ¶
func (e *InvalidVersionError) Error() string
type Version ¶
func (Version) MarshalJSON ¶ added in v0.1.109
func (Version) SignificantlyBehind ¶
func (*Version) UnmarshalJSON ¶ added in v0.1.109
Click to show internal directories.
Click to hide internal directories.