flag

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WithArgumentsFlag = NewStringVar("with-arguments", "",
		config.TranslateInLang(_flagWithArgumentsUsage, config.UILanguage))
)

vars

Functions

This section is empty.

Types

type Flag

type Flag interface {
	Label() string
	RegisterCommand(*cobra.Command)
	Value() interface{}
	MarkFlagRequired(*cobra.Command)
}

Flag defines a cobra command flag

func BoolVarP added in v0.8.1

func BoolVarP(
	label string,
	shortLabel string,
	defaultValue bool,
	description string,
) Flag

BoolVarP creates a new stringVarP flag

func NewStringVar added in v1.0.0

func NewStringVar(
	label string,
	defaultValue string,
	description string,
) Flag

NewStringVar creates a new stringVar flag

func NewStringVarP

func NewStringVarP(
	label string,
	shortLabel string,
	defaultValue string,
	description string,
) Flag

NewStringVarP creates a new stringVarP flag

func NewUint64VarP

func NewUint64VarP(
	label string,
	shortLabel string,
	defaultValue uint64,
	description string,
) Flag

NewUint64VarP creates a new uint64VarP flag

Jump to

Keyboard shortcuts

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