versions

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interval added in v1.1.0

type Interval []Version

func ParseInterval added in v1.1.0

func ParseInterval(source []byte) (interval Interval, err error)

ParseInterval left:right

func (Interval) Accept added in v1.1.0

func (interval Interval) Accept(target Version) (ok bool)

func (Interval) String added in v1.1.0

func (interval Interval) String() string

type Intervals added in v1.1.0

type Intervals []NamedInterval

func ParseIntervals added in v1.1.0

func ParseIntervals(source []byte) (intervals Intervals, err error)

ParseIntervals key=left:right, ...

func (Intervals) Accept added in v1.1.0

func (intervals Intervals) Accept(name []byte, target Version) (ok bool)

func (Intervals) Bytes added in v1.1.0

func (intervals Intervals) Bytes() []byte

func (Intervals) Get added in v1.1.0

func (intervals Intervals) Get(name []byte) (interval Interval, has bool)

func (Intervals) String added in v1.1.0

func (intervals Intervals) String() string

type NamedInterval added in v1.1.0

type NamedInterval struct {
	Name  []byte   `json:"name"`
	Value Interval `json:"value"`
}

type Version

type Version struct {
	Major int `json:"major"`
	Minor int `json:"minor"`
	Patch int `json:"patch"`
}

func Latest added in v1.0.10

func Latest() Version

func New

func New(major int, minor int, patch int) (v Version)

func Origin added in v1.0.10

func Origin() Version

func Parse

func Parse(v []byte) (ver Version, err error)

func (Version) Between

func (ver Version) Between(left Version, right Version) (ok bool)

func (Version) Equals added in v1.0.10

func (ver Version) Equals(o Version) (ok bool)

func (Version) Format added in v1.2.84

func (ver Version) Format() (v string)

func (Version) IsLatest added in v1.0.10

func (ver Version) IsLatest() (ok bool)

func (Version) IsOrigin added in v1.0.10

func (ver Version) IsOrigin() (ok bool)

func (Version) LessThan added in v1.0.5

func (ver Version) LessThan(o Version) (ok bool)

func (Version) String

func (ver Version) String() (v string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL