Documentation ¶
Overview ¶
Package verflag defines utility functions to handle command line flags related to version of Kubernetes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFlags ¶
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 VersionVar ¶
func VersionVar(p *VersionValue, name string, value VersionValue, usage string)
Types ¶
type VersionValue ¶
type VersionValue int
const ( VersionFalse VersionValue = 0 VersionTrue VersionValue = 1 VersionRaw VersionValue = 2 )
func Version ¶
func Version(name string, value VersionValue, usage string) *VersionValue
func (*VersionValue) Get ¶
func (v *VersionValue) Get() interface{}
func (*VersionValue) IsBoolFlag ¶
func (v *VersionValue) IsBoolFlag() bool
func (*VersionValue) Set ¶
func (v *VersionValue) Set(s string) error
func (*VersionValue) String ¶
func (v *VersionValue) String() string
func (*VersionValue) Type ¶
func (v *VersionValue) Type() string
The type of the flag as required by the pflag.Value interface
Click to show internal directories.
Click to hide internal directories.