version

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bump

func Bump(version string, releaseType ReleaseType) (string, error)

Bump bumps a version component up by one

func Compare

func Compare(left string, right string) int

Compare compares two versions

func Format

func Format(input string) string

Format formats the version

func FulfillsConstraint

func FulfillsConstraint(version string, constraint string) bool

FulfillsConstraint checks if the given version fulfills the constraint

func IsStable

func IsStable(input string) bool

IsStable checks if the input is a stable semver version

func IsValidSemver

func IsValidSemver(input string) bool

IsValidSemver checks that the given input is a valid semver version

Types

type ReleaseType

type ReleaseType int32
const (
	ReleaseNone  ReleaseType = 0
	ReleasePatch ReleaseType = 1
	ReleaseMinor ReleaseType = 2
	ReleaseMajor ReleaseType = 3
)

func HighestReleaseType

func HighestReleaseType(numbers []ReleaseType) ReleaseType

Jump to

Keyboard shortcuts

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