flags

package
v0.7.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CobraInt          = "int"
	CobraSting        = "string"
	CobraBool         = "bool"
	CobraFloat64      = "float64"
	CobraStringArray  = "stringArray"
	CobraIntSlice     = "intSlice"
	CobraFloat64Slice = "float64Slice"
	CobraBoolSlice    = "boolSlice"
)

Variables

This section is empty.

Functions

func AddClusterDefinitionFlag

func AddClusterDefinitionFlag(f cmdutil.Factory, cmd *cobra.Command, p *string)

AddClusterDefinitionFlag adds a flag "cluster-definition" for the cmd and stores the value of the flag in string p

func AddComponentFlag

func AddComponentFlag(f cmdutil.Factory, cmd *cobra.Command, p *string, usage string)

AddComponentFlag add flag "component" for cobra.Command and support auto complete for it

func AddComponentsFlag

func AddComponentsFlag(f cmdutil.Factory, cmd *cobra.Command, p *[]string, usage string)

AddComponentsFlag add flag "components" for cobra.Command and support auto complete for it

func BuildFlagsBySchema

func BuildFlagsBySchema(cmd *cobra.Command, schema *spec.Schema) error

BuildFlagsBySchema builds a flag.FlagSet by the given schema, convert the schema key to flag name, and convert the schema type to flag type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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