package globalflag

import "k8s.io/kubernetes/staging/src/k8s.io/component-base/cli/globalflag"

Index

Functions

func AddGlobalFlags

func AddGlobalFlags(fs *pflag.FlagSet, name string)

AddGlobalFlags explicitly registers flags that libraries (klog, verflag, etc.) register against the global flagsets from "flag" and "k8s.io/klog". We do this in order to prevent unwanted flags from leaking into the component's flagset.

func Register

func Register(local *pflag.FlagSet, globalName string)

Register adds a flag to local that targets the Value associated with the Flag named globalName in flag.CommandLine.

Source Files

globalflags.go

Version
v1.14.3
Published
Jun 4, 2019
Platform
linux/amd64
Imports
5 packages
Last checked
55 seconds ago

Tools for package owners.