ver

package
v0.0.0-...-7b0021b Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version struct {
	Major int
	Minor int
	Patch int
	Build int
}

func Parse

func Parse(input string) (Version, error)

Parse parses the given input string into a Version. A version must have the format A.B.C.D and at least a major and minor number to be accepted (unlike the semver 2.0.0 specification which requires also a patch number to be present).

func (Version) Compare

func (v Version) Compare(o Version) int

Compare compares two versions. It returns -1 if v is less than o, 0 if v is equal to o and 1 if v is greater than o.

func (Version) Equals

func (v Version) Equals(o Version) bool

func (Version) Greater

func (v Version) Greater(o Version) bool

func (Version) Less

func (v Version) Less(o Version) bool

func (*Version) Scan

func (v *Version) Scan(src interface{}) error

func (Version) String

func (v Version) String() string

func (Version) Value

func (v Version) Value() (driver.Value, error)

type Versions

type Versions []Version

func (Versions) Len

func (l Versions) Len() int

func (Versions) Less

func (l Versions) Less(i, j int) bool

func (Versions) Swap

func (l Versions) Swap(i, j int)

Jump to

Keyboard shortcuts

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