Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ConstraintK8sGreaterEqual126 is a version constraint for versions >= 1.26. ConstraintK8sGreaterEqual126 *semver.Constraints // ConstraintK8sLess126 is a version constraint for versions < 1.26. ConstraintK8sLess126 *semver.Constraints // ConstraintK8sGreaterEqual127 is a version constraint for versions >= 1.27. ConstraintK8sGreaterEqual127 *semver.Constraints // ConstraintK8sLess127 is a version constraint for versions < 1.27. ConstraintK8sLess127 *semver.Constraints // ConstraintK8sGreaterEqual128 is a version constraint for versions >= 1.28. ConstraintK8sGreaterEqual128 *semver.Constraints // ConstraintK8sGreaterEqual129 is a version constraint for versions >= 1.29. ConstraintK8sGreaterEqual129 *semver.Constraints // ConstraintK8sLess130 is a version constraint for versions < 1.30. ConstraintK8sLess130 *semver.Constraints // ConstraintK8sGreaterEqual130 is a version constraint for versions >= 1.30. ConstraintK8sGreaterEqual130 *semver.Constraints // ConstraintK8sLess131 is a version constraint for versions < 1.31. ConstraintK8sLess131 *semver.Constraints // ConstraintK8sGreaterEqual131 is a version constraint for versions >= 1.31. ConstraintK8sGreaterEqual131 *semver.Constraints )
Functions ¶
func CheckVersionMeetsConstraint ¶
CheckVersionMeetsConstraint returns true if the <version> meets the <constraint>.
func CompareVersions ¶
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.
Types ¶
type VersionRange ¶ added in v1.84.0
VersionRange represents a version range of type [AddedInVersion, RemovedInVersion).
func (*VersionRange) Contains ¶ added in v1.84.0
func (r *VersionRange) Contains(version string) (bool, error)
Contains returns true if the range contains the given version, false otherwise. The range contains the given version only if it's greater or equal than AddedInVersion (always true if AddedInVersion is empty), and less than RemovedInVersion (always true if RemovedInVersion is empty).
func (*VersionRange) SupportedVersionRange ¶ added in v1.84.0
func (r *VersionRange) SupportedVersionRange() string
SupportedVersionRange returns the supported version range for the given API.