flag

package
v2.19.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flag

type Flag struct {
	Name        []string `json:"name"`
	Description string   `json:"description"`
	Default     []string `json:"default"`
	Required    bool     `json:"required"`
	Env         []string `json:"env"`
	NoValue     bool     `json:"no_value"`
	SingleValue bool     `json:"single_value"`
	HookFuncs   []HookFunc
	Values      []string
	Exist       bool
}

func (*Flag) Get

func (a *Flag) Get() (string, bool)

func (*Flag) GetBool

func (a *Flag) GetBool() (bool, bool)

func (*Flag) GetInt

func (a *Flag) GetInt() (int, bool)

func (*Flag) GetInt64

func (a *Flag) GetInt64() (int64, bool)

func (*Flag) GetInt64s

func (a *Flag) GetInt64s() ([]int64, error)

func (*Flag) GetInts

func (a *Flag) GetInts() []int

func (*Flag) GetX

func (a *Flag) GetX() string

func (*Flag) Gets

func (a *Flag) Gets() []string

func (*Flag) JoinDefault

func (a *Flag) JoinDefault() string

func (*Flag) JoinName

func (a *Flag) JoinName() string

func (*Flag) ValsLen

func (a *Flag) ValsLen() int

type HookFunc

type HookFunc func(*Flag) error

Jump to

Keyboard shortcuts

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