k8sversion

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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