Documentation ¶
Overview ¶
Copyright 2020 The Kubernetes Authors.
SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
Version type definition for handling simple version comparision
func NewVersion ¶
NewVersion creates a new version object for given major and minor version values
func Parse ¶
Parse creates a new version with major/minor from the given string, which must have the format <major>.<minor>. Error texts do not include the version string itself.
func (Version) Compare ¶
Compare compares v with given otherVersion Returns - 0 if two versions are same - >0 if v is greater otherVersion - <0 if v is less than otherVersion
func (Version) CompareVersion ¶ added in v1.1.0
CompareVersion is the same as Compare with a Version as argument.
Click to show internal directories.
Click to hide internal directories.