semver

package module
v0.0.0-...-775ef2c Latest Latest
Warning

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

Go to latest
Published: May 19, 2019 License: ISC Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyCompatible

func AnyCompatible(compatible []Semver, actual Semver) (isApiCompat bool)

AnyCompatible checks if the version is compatible with any versions in a slice of versions.

func Compatible

func Compatible(required, actual Semver) bool

Compatible decides if the actual version is compatible with the required one.

Types

type Semver

type Semver struct {
	// contains filtered or unexported fields
}

Semver models a semantic version (semver) major.minor.patch

func NewSemver

func NewSemver(major, minor, patch uint32) Semver

NewSemver returns a new Semver with the version major.minor.patch

func ParseVersionStr

func ParseVersionStr(ver string) (*Semver, error)

ParseVersionStr makes a *Semver from a version string (e.g. v3.1.0, 5.3.2, 7.3, etc.). The "v" prefix is optional, as are the minor and patch versions.

func (*Semver) Split

func (s *Semver) Split() (uint32, uint32, uint32)

Split returns the major, minor and patch version.

func (Semver) String

func (s Semver) String() string

Jump to

Keyboard shortcuts

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