flag

package
v2.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 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

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

BoolVarP creates a new stringVarP flag

func NewStringVar

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