flags

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flags

type Flags struct {

	// RestConfig is the shared based rest config to connect to the Kubernetes
	// API.
	RestConfig *rest.Config

	// DriverName is the driver name as installed in Kubernetes.
	DriverName string

	// Logr is a shared logger.
	Logr logr.Logger
	// contains filtered or unexported fields
}

Flags is a shared struct that stores and manages flags for an app.

func New

func New() *Flags

func (*Flags) Add

func (f *Flags) Add(name string, regFn RegisterFunc) *Flags

func (*Flags) Complete

func (f *Flags) Complete() error

func (*Flags) Prepare

func (f *Flags) Prepare(cmd *cobra.Command) *Flags

type RegisterFunc

type RegisterFunc func(fs *pflag.FlagSet)

Jump to

Keyboard shortcuts

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