Versions in this module Expand all Collapse all v0 v0.1.0 Jul 24, 2026 Changes in this version + var ErrBumpOverflow = errors.New("calver: bump overflows uint64") + var ErrInvalidParts = errors.New("calver: invalid parts for format") + var ErrUnsupportedBump = errors.New("calver: bump requires a generic numeric level") + type CompileError struct + Kind ErrorKind + Offset int + func (e *CompileError) Error() string + type ComponentKind uint8 + const ComponentKindDay + const ComponentKindMajor + const ComponentKindMicro + const ComponentKindMinor + const ComponentKindModifier + const ComponentKindMonth + const ComponentKindNone + const ComponentKindWeek + const ComponentKindYear + type ErrorKind string + const ErrAmbiguousLayout + const ErrDuplicateLevel + const ErrEmptyFormat + const ErrEmptyModifier + const ErrIncompatibleTokens + const ErrInvalidDate + const ErrInvalidEscape + const ErrInvalidNumber + const ErrInvalidToken + const ErrLiteralMismatch + const ErrModifierPosition + const ErrOutOfRange + const ErrOverflow + type Format struct + func Compile(layout string) (Format, error) + func MustCompile(layout string) Format + func (f Format) HasLevel(level Level) bool + func (f Format) Kind(level Level) ComponentKind + func (f Format) Layout() string + func (f Format) New(parts Parts) (Version, error) + func (f Format) Parse(input string) (Version, bool) + func (f Format) ParseStrict(input string) (Version, error) + type Level uint8 + const LevelMajor + const LevelMicro + const LevelMinor + const LevelModifier + type List []Version + func (list List) Len() int + func (list List) Less(left, right int) bool + func (list List) Sort() + func (list List) Swap(left, right int) + type ParseError struct + Kind ErrorKind + Offset int + func (e *ParseError) Error() string + type Parts struct + Major uint64 + Micro uint64 + Minor uint64 + Modifier string + type Version struct + func Parse(layout, input string) (Version, bool) + func ParseStrict(layout, input string) (Version, error) + func (v *Version) UnmarshalJSON(data []byte) error + func (v Version) AppendTo(dst []byte) []byte + func (v Version) BumpMajor() (Version, error) + func (v Version) BumpMicro() (Version, error) + func (v Version) BumpMinor() (Version, error) + func (v Version) Compare(other Version) int + func (v Version) CompareCalendar(other Version) (order int, ok bool) + func (v Version) CompatibleWith(other Version) bool + func (v Version) Equal(other Version) bool + func (v Version) Format() Format + func (v Version) Greater(other Version) bool + func (v Version) GreaterOrEqual(other Version) bool + func (v Version) IsValid() bool + func (v Version) Less(other Version) bool + func (v Version) LessOrEqual(other Version) bool + func (v Version) Major() (uint64, bool) + func (v Version) MarshalJSON() ([]byte, error) + func (v Version) MarshalText() ([]byte, error) + func (v Version) Max(other Version) Version + func (v Version) Micro() (uint64, bool) + func (v Version) Min(other Version) Version + func (v Version) Minor() (uint64, bool) + func (v Version) Modifier() string + func (v Version) Series(level Level) string + func (v Version) String() string