semver

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSemverEmpty  = errors.New("version string empty")
	ErrSemverFormat = errors.New("version format error")
)

Functions

This section is empty.

Types

type Version

type Version struct {
	Major         uint64
	Minor         uint64
	Patch         uint64
	Blank         string // "-" or "+"
	BuildMetadata string
}

func New

func New(ver string) (v Version, err error)

func (Version) CompareMajor

func (v Version) CompareMajor(x Version) int

func (Version) CompareMinor

func (v Version) CompareMinor(x Version) int

func (Version) ComparePatch

func (v Version) ComparePatch(x Version) int

func (Version) Equal

func (v Version) Equal(x Version) bool

Equal compares Versions v to x: -1 == v is less than x 0 == v is equal to x 1 == v is greater than x

func (Version) String

func (v Version) String() string

Jump to

Keyboard shortcuts

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