Versions in this module Expand all Collapse all v3 v3.2.1 Jan 21, 2024 Changes in this version + var ErrEmptyString = errors.New("Version string empty") + var ErrInvalidCharacters = errors.New("Invalid characters in version") + var ErrInvalidMetadata = errors.New("Invalid Metadata string") + var ErrInvalidPrerelease = errors.New("Invalid Prerelease string") + var ErrInvalidSemVer = errors.New("Invalid Semantic Version") + var ErrSegmentStartsZero = errors.New("Version segment starts with 0") + type Collection []*Version + func (c Collection) Len() int + func (c Collection) Less(i, j int) bool + func (c Collection) Swap(i, j int) + type Constraints struct + func NewConstraint(c string) (*Constraints, error) + func (cs *Constraints) UnmarshalText(text []byte) error + func (cs Constraints) Check(v *Version) bool + func (cs Constraints) MarshalText() ([]byte, error) + func (cs Constraints) String() string + func (cs Constraints) Validate(v *Version) (bool, []error) + type Version struct + func MustParse(v string) *Version + func New(major, minor, patch uint64, pre, metadata string) *Version + func NewVersion(v string) (*Version, error) + func StrictNewVersion(v string) (*Version, error) + func (v *Version) Compare(o *Version) int + func (v *Version) Equal(o *Version) bool + func (v *Version) GreaterThan(o *Version) bool + func (v *Version) LessThan(o *Version) bool + func (v *Version) Original() string + func (v *Version) Scan(value interface{}) error + func (v *Version) UnmarshalJSON(b []byte) error + func (v *Version) UnmarshalText(text []byte) error + func (v Version) IncMajor() Version + func (v Version) IncMinor() Version + func (v Version) IncPatch() Version + func (v Version) Major() uint64 + func (v Version) MarshalJSON() ([]byte, error) + func (v Version) MarshalText() ([]byte, error) + func (v Version) Metadata() string + func (v Version) Minor() uint64 + func (v Version) Patch() uint64 + func (v Version) Prerelease() string + func (v Version) SetMetadata(metadata string) (Version, error) + func (v Version) SetPrerelease(prerelease string) (Version, error) + func (v Version) String() string + func (v Version) Value() (driver.Value, error)