version

package
v0.0.0-...-c5ab296 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: MPL-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidSemVer = errors.New("invalid semantic version")

ErrInvalidSemVer is returned a version is found to be invalid when being parsed.

View Source
var ErrNoMajorMinorPatchElementsFound = errors.New("No Major.Minor.Patch elements found")
View Source
var ErrVersionTagMissing = errors.New("version tag is missing")

ErrVersionTagMissing - tag missing error

Functions

func GetImageNameAndVersion

func GetImageNameAndVersion(name string) (string, *types.Version, error)

GetImageNameAndVersion - get name and version

func GetVersion

func GetVersion(version string) (*types.Version, error)

GetVersion - parse version

func GetVersionFromImageName

func GetVersionFromImageName(name string) (*types.Version, error)

GetVersionFromImageName - get version from image name

func Lowest

func Lowest(tags []string) string

Lowest - returns the lowest versioned tag from the slice

func MustParse

func MustParse(version string) *types.Version

MustParse - must parse version, if fails - panics

func NewAvailable

func NewAvailable(current string, tags []string, matchPreRelease bool) (newVersion string, newAvailable bool, err error)

NewAvailable - takes version and current tags. Checks whether there is a new version in the list of tags and returns it as well as newAvailable bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳