semver

package
v1.16.12-beta050 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 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

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