package verflag
import "k8s.io/component-base/version/verflag"
Package verflag defines utility functions to handle command line flags related to version of Kubernetes.
Index ¶
- Constants
- func AddFlags(fs *flag.FlagSet)
- func PrintAndExitIfRequested()
- func Version(name string, value versionValue, usage string) *versionValue
- func VersionVar(p *versionValue, name string, value versionValue, usage string)
Constants ¶
const ( VersionFalse versionValue = "false" VersionTrue versionValue = "true" VersionRaw versionValue = "raw" )
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 --version or --version=raw was passed and, if so, print the version and exit.
func Version ¶
func VersionVar ¶
Source Files ¶
verflag.go
- Version
- v0.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 4 hours ago –
Tools for package owners.