verflag

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 5 Imported by: 0

Documentation

Overview

Deprecated: use k8s.io/component-base/version/verflag instead.

Index

Constants

View Source
const (
	// VersionFalse represents 'false' value for the version flag
	VersionFalse versionValue = 0
	// VersionTrue represents 'true' value for the version flag
	VersionTrue versionValue = 1
	// VersionRaw represents 'raw' value for the version flag
	VersionRaw versionValue = 2
)

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(fs *flag.FlagSet)

AddFlags registers this package's flags on arbitrary FlagSets, such that they point to the same value as the global flags.

func PrintAndExitIfRequested

func PrintAndExitIfRequested()

PrintAndExitIfRequested will check if the --version flag was passed and, if so, print the version and exit.

func Version

func Version(name string, value versionValue, usage string) *versionValue

Version returns a new version flag

func VersionVar

func VersionVar(p *versionValue, name string, value versionValue, usage string)

VersionVar defines the given version flag

Types

This section is empty.

Jump to

Keyboard shortcuts

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