version

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2016 License: GPL-3.0, GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CurrentGaugeVersion = &Version{0, 3, 1}

Functions

func CheckCompatibility added in v0.1.7

func CheckCompatibility(currentVersion *Version, versionSupport *VersionSupport) error

func CompareVersions

func CompareVersions(first *Version, second *Version, compareFunc func(int, int) bool) bool

func GreaterThanFunc

func GreaterThanFunc(first, second int) bool

func IsEqual

func IsEqual(first, second int) bool

func LesserThanFunc

func LesserThanFunc(first, second int) bool

func VersionError

func VersionError(level, text string, err error) error

Types

type Version

type Version struct {
	Major int
	Minor int
	Patch int
}

func GetLatestVersion added in v0.3.0

func GetLatestVersion(versions []*Version) *Version

func ParseVersion

func ParseVersion(versionText string) (*Version, error)

func (*Version) IsBetween

func (Version *Version) IsBetween(lower *Version, greater *Version) bool

func (*Version) IsEqualTo

func (Version *Version) IsEqualTo(version1 *Version) bool

func (*Version) IsGreaterThan

func (Version *Version) IsGreaterThan(version1 *Version) bool

func (*Version) IsGreaterThanEqualTo

func (Version *Version) IsGreaterThanEqualTo(version1 *Version) bool

func (*Version) IsLesserThan

func (Version *Version) IsLesserThan(version1 *Version) bool

func (*Version) IsLesserThanEqualTo

func (Version *Version) IsLesserThanEqualTo(version1 *Version) bool

func (*Version) String

func (Version *Version) String() string

type VersionSupport added in v0.1.7

type VersionSupport struct {
	Minimum string
	Maximum string
}

Jump to

Keyboard shortcuts

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