semver

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoVersionFound return a error when no version couldn't be found
	ErrNoVersionFound error = errors.New("No version found")
	// ErrNoVersionsFound return a error when the versions list is empty
	ErrNoVersionsFound error = errors.New("Versions list empty")
)

Functions

This section is empty.

Types

type Semver

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

Semver is an interface in front the masterminds/semver used across the updatecli project

func (*Semver) Init

func (s *Semver) Init(versions []string) error

Init creates a new semver object

func (*Semver) Search

func (s *Semver) Search(versions []string) (version string, err error)

Search returns the version matching pattern from a sorted list.

func (*Semver) Sort

func (s *Semver) Sort()

Sort re-order a list of versions with the newest version first

Jump to

Keyboard shortcuts

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