version

package
v1.6.27 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Major version
	Major = "major"
	// Minor version
	Minor = "minor"
	// Patch version
	Patch = "patch"
)

Variables

This section is empty.

Functions

func GetNewest

func GetNewest(versions []string) string

GetNewest returns greatest version from passed versions list

func IsPrerelease

func IsPrerelease(currentVersion string) bool

IsPrerelease detects if release is prerelease

func Lt

func Lt(version1, version2 string) (bool, error)

Lt checks if version1 is less-than version2, returns error in case of invalid version string

func Lte added in v0.8.9

func Lte(version1, version2 string) (bool, error)

Lte checks if version1 is less-than or equal version2, returns error in case of invalid version string

func Next

func Next(currentVersion, kind string) (string, error)

Next returns next generated semver based on version position

func NextPrerelease

func NextPrerelease(currentVersion string) (string, error)

NextPrerelease returns pre-release version e.g. current -> 0.10.1; nextPrerelease -> 0.10.2-beta001

Types

This section is empty.

Jump to

Keyboard shortcuts

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