version

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package version provides utilities for handling version information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get() v1version.Info

Get returns the version information.

Types

type Version

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

Version is an opaque representation of a version number.

func ParseSemantic

func ParseSemantic(str string) (*Version, error)

ParseSemantic parses a semantic version string and returns a Version object. It's from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/component-base/version/dynamic.go

func (*Version) Major

func (v *Version) Major() uint

Major returns the major version component.

func (*Version) Minor

func (v *Version) Minor() uint

Minor returns the minor version component.

func (*Version) Patch

func (v *Version) Patch() uint

Patch returns the patch version component.

Jump to

Keyboard shortcuts

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