flag

package
v0.0.1-beta Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolFlag

type BoolFlag struct {
	Name           string
	Alias          string
	Usage          string
	Value          bool
	Required       bool
	Hidden         bool
	PersistentFlag bool
}

BoolFlag pFlag wrapper

func (*BoolFlag) GetName

func (f *BoolFlag) GetName() string

GetName get flag name

func (*BoolFlag) IsHidden

func (f *BoolFlag) IsHidden() bool

IsHidden Flag hidden or not

func (*BoolFlag) IsPersistentFlag

func (f *BoolFlag) IsPersistentFlag() bool

func (*BoolFlag) IsRequired

func (f *BoolFlag) IsRequired() bool

IsRequired Flag required or not

func (*BoolFlag) ParseToString

func (f *BoolFlag) ParseToString() string

func (*BoolFlag) UniqueKey

func (f *BoolFlag) UniqueKey() string

type CompositeFlag

type CompositeFlag struct {
	Flags         []Flag
	Required      bool
	Hidden        bool
	RequiredBrace bool
	Type          CompositeFlagType
}

CompositeFlag struct for composite flags

func (*CompositeFlag) GetName

func (cf *CompositeFlag) GetName() string

func (*CompositeFlag) IsHidden

func (cf *CompositeFlag) IsHidden() bool

func (*CompositeFlag) IsRequired

func (cf *CompositeFlag) IsRequired() bool

func (*CompositeFlag) ParseToString

func (cf *CompositeFlag) ParseToString() string

ParseToString method for CompositeFlag

func (*CompositeFlag) UniqueKey

func (cf *CompositeFlag) UniqueKey() string

type CompositeFlagType

type CompositeFlagType uint
const (
	RelationshipAND CompositeFlagType = iota
	RelationshipOR
)

type Flag

type Flag interface {
	ParseToString() string

	GetName() string
	IsRequired() bool
	IsHidden() bool
	UniqueKey() string
	// contains filtered or unexported methods
}

type Int64Flag

type Int64Flag struct {
	Name           string
	Alias          string
	Usage          string
	Value          int64
	Required       bool
	Hidden         bool
	PersistentFlag bool
}

Int64Flag pFlag wrapper

func (*Int64Flag) GetName

func (f *Int64Flag) GetName() string

func (*Int64Flag) IsHidden

func (f *Int64Flag) IsHidden() bool

func (*Int64Flag) IsPersistentFlag

func (f *Int64Flag) IsPersistentFlag() bool

func (*Int64Flag) IsRequired

func (f *Int64Flag) IsRequired() bool

func (*Int64Flag) ParseToString

func (f *Int64Flag) ParseToString() string

func (*Int64Flag) UniqueKey

func (f *Int64Flag) UniqueKey() string

type IntFlag

type IntFlag struct {
	Name           string
	Alias          string
	Usage          string
	Value          int
	Required       bool
	Hidden         bool
	PersistentFlag bool
}

IntFlag pFlag wrapper

func (*IntFlag) GetName

func (f *IntFlag) GetName() string

func (*IntFlag) IsHidden

func (f *IntFlag) IsHidden() bool

func (*IntFlag) IsPersistentFlag

func (f *IntFlag) IsPersistentFlag() bool

func (*IntFlag) IsRequired

func (f *IntFlag) IsRequired() bool

func (*IntFlag) ParseToString

func (f *IntFlag) ParseToString() string

func (*IntFlag) UniqueKey

func (f *IntFlag) UniqueKey() string

type StringFlag

type StringFlag struct {
	Name           string
	Alias          string
	Usage          string
	Value          string
	Required       bool
	Hidden         bool
	PersistentFlag bool
}

StringFlag pFlag wrapper

func (*StringFlag) GetName

func (f *StringFlag) GetName() string

func (*StringFlag) IsHidden

func (f *StringFlag) IsHidden() bool

func (*StringFlag) IsPersistentFlag

func (f *StringFlag) IsPersistentFlag() bool

func (*StringFlag) IsRequired

func (f *StringFlag) IsRequired() bool

func (*StringFlag) ParseToString

func (f *StringFlag) ParseToString() string

func (*StringFlag) UniqueKey

func (f *StringFlag) UniqueKey() string

type StringSliceFlag

type StringSliceFlag struct {
	Name           string
	Alias          string
	Usage          string
	Value          []string
	Required       bool
	Hidden         bool
	PersistentFlag bool
}

StringSliceFlag pFlag wrapper

func (*StringSliceFlag) GetName

func (f *StringSliceFlag) GetName() string

func (*StringSliceFlag) IsHidden

func (f *StringSliceFlag) IsHidden() bool

func (*StringSliceFlag) IsPersistentFlag

func (f *StringSliceFlag) IsPersistentFlag() bool

func (*StringSliceFlag) IsRequired

func (f *StringSliceFlag) IsRequired() bool

func (*StringSliceFlag) ParseToString

func (f *StringSliceFlag) ParseToString() string

func (*StringSliceFlag) UniqueKey

func (f *StringSliceFlag) UniqueKey() string

Jump to

Keyboard shortcuts

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