version

package
v1.61.5 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 4 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConstraintK8sEqual120 is a version constraint for versions == 1.20.
	ConstraintK8sEqual120 *semver.Constraints
	// ConstraintK8sLessEqual121 is a version constraint for versions <= 1.21.
	ConstraintK8sLessEqual121 *semver.Constraints
	// ConstraintK8sEqual121 is a version constraint for versions == 1.21.
	ConstraintK8sEqual121 *semver.Constraints
	// ConstraintK8sGreaterEqual121 is a version constraint for versions >= 1.21.
	ConstraintK8sGreaterEqual121 *semver.Constraints
	// ConstraintK8sLessEqual122 is a version constraint for versions <= 1.22.
	ConstraintK8sLessEqual122 *semver.Constraints
	// ConstraintK8sEqual122 is a version constraint for versions == 1.22.
	ConstraintK8sEqual122 *semver.Constraints
	// ConstraintK8sGreaterEqual122 is a version constraint for versions >= 1.22.
	ConstraintK8sGreaterEqual122 *semver.Constraints
	// ConstraintK8sEqual123 is a version constraint for versions == 1.23.
	ConstraintK8sEqual123 *semver.Constraints
	// ConstraintK8sGreaterEqual123 is a version constraint for versions >= 1.23.
	ConstraintK8sGreaterEqual123 *semver.Constraints
	// ConstraintK8sEqual124 is a version constraint for versions == 1.24.
	ConstraintK8sEqual124 *semver.Constraints
	// ConstraintK8sLess124 is a version constraint for versions < 1.24.
	ConstraintK8sLess124 *semver.Constraints
	// ConstraintK8sGreaterEqual125 is a version constraint for versions >= 1.25.
	ConstraintK8sGreaterEqual125 *semver.Constraints
	// ConstraintK8sLess125 is a version constraint for versions < 1.25.
	ConstraintK8sLess125 *semver.Constraints
	// ConstraintK8sGreaterEqual126 is a version constraint for versions >= 1.26.
	ConstraintK8sGreaterEqual126 *semver.Constraints
)

Functions

func CheckVersionMeetsConstraint

func CheckVersionMeetsConstraint(version, constraint string) (bool, error)

CheckVersionMeetsConstraint returns true if the <version> meets the <constraint>.

func CompareVersions

func CompareVersions(version1, operator, version2 string) (bool, error)

CompareVersions returns true if the constraint <version1> compared by <operator> to <version2> returns true, and false otherwise. The comparison is based on semantic versions, i.e. <version1> and <version2> will be converted if needed.

func Normalize added in v1.60.0

func Normalize(version string) string

Normalize normalizes the version by cutting prefixes and suffixes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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