semver

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base added in v1.0.4

func Base(v string) string

Base base returns base version part of given version string

func Canonical added in v1.0.4

func Canonical(v string) string

Canonical returns canonical semver from some version-like input string

func Compare

func Compare(x, y string) int

Compare exposes outside semver.Compare from internal package

func IsPrerelease added in v1.0.4

func IsPrerelease(v string) bool

IsPrerelease if this version is pre-released in our custom sense: it should have form vX.Y.Z-pre-....

func IsValid

func IsValid(sample string) bool

IsValid exposes outside semver.IsValid from internal package

func Major

func Major(sample string) int

Major returns major component of semver string. Returns -1 if major component turned to be not a number

func MajorMinorPatch added in v1.0.4

func MajorMinorPatch(version string) (int, int, int)

MajorMinorPatch returns three main components of given semver

func Max added in v1.0.4

func Max(v, w string) string

Max return maximal semver between two

func Pseudo added in v1.0.4

func Pseudo(v string) string

Pseudo determines if given version v looks like a pseudo-version. Returns SHA if it does.

func PseudoParts added in v1.0.4

func PseudoParts(v string) (base string, moment string, sha string)

PseudoParts returns parts of pseudo version. All parts are empty if it is not pseudo-version

Types

This section is empty.

Jump to

Keyboard shortcuts

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