k8sversion

package
v1.18.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 2 Imported by: 59

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubernetesVersion

type KubernetesVersion struct {
	// contains filtered or unexported fields
}

KubernetesVersion holds a semver-version of kubernetes

func Parse

func Parse(version string) (*KubernetesVersion, error)

Parse parses the string to determine the KubernetesVersion. The version may be a semver version, or it may be a URL with the kubernetes version in the path

func (*KubernetesVersion) IsGTE

func (k *KubernetesVersion) IsGTE(version string) bool

IsGTE checks if the version is greater than or equal to the passed version. Pre and Build fields are ignored. Panic if version is not valid, so version should only be used with static strings like "1.10"

func (*KubernetesVersion) String

func (k *KubernetesVersion) String() string

String returns a string representation of the semver, like 1.10.1. It does not include a leading 'v'

Jump to

Keyboard shortcuts

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