option

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExactArgs added in v0.2.0

func ExactArgs(n int) cobra.PositionalArgs

ExactArgs is a wrapper around cobra.ExactArgs to additionally print usage string

func MinimumNArgs added in v0.2.0

func MinimumNArgs(n int) cobra.PositionalArgs

MinimumNArgs is a wrapper around cobra.MinimumNArgs to additionally print usage string

func NewScheme

func NewScheme() (*runtime.Scheme, error)

func ReadManifests

func ReadManifests(filenames ...string) ([]byte, error)

Types

type FlagFn

type FlagFn func(*pflag.FlagSet)

func Filenames

func Filenames(verb string, v *[]string) FlagFn

func Freight

func Freight(v *string) FlagFn

func InsecureTLS

func InsecureTLS(v *bool) FlagFn

func LocalServer

func LocalServer(v *bool) FlagFn

func OptionalStage

func OptionalStage(v Optional[string]) FlagFn

func Project added in v0.3.0

func Project(v *string, defaultProject string) FlagFn

type Option

type Option struct {
	InsecureTLS        bool
	LocalServerAddress string
	UseLocalServer     bool

	Project string

	IOStreams  *genericclioptions.IOStreams
	PrintFlags *genericclioptions.PrintFlags
}

func NewOption

func NewOption(cfg config.CLIConfig) *Option

type Optional

type Optional[T any] interface {
	pflag.Value

	IsPresent() bool
	Get() (T, bool)
	OrElse(fallback T) T
}

func OptionalBool

func OptionalBool() Optional[bool]

func OptionalString

func OptionalString() Optional[string]

Jump to

Keyboard shortcuts

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