Documentation ¶
Index ¶
- Constants
- Variables
- func Arg(i int) string
- func Args() []string
- func Bool(name string, def bool, opts ...Option) *bool
- func BoolList(name string, def []bool, opts ...Option) *[]bool
- func BoolListVar(p *[]bool, name string, def []bool, opts ...Option)
- func BoolVar(p *bool, name string, def bool, opts ...Option)
- func Duration(name string, def time.Duration, opts ...Option) *time.Duration
- func DurationList(name string, def []time.Duration, opts ...Option) *[]time.Duration
- func DurationListVar(p *[]time.Duration, name string, def []time.Duration, opts ...Option)
- func DurationVar(p *time.Duration, name string, def time.Duration, opts ...Option)
- func ErrorHandling() flag.ErrorHandling
- func File(name string, def *os.File, opts ...Option) *os.File
- func FileList(name string, def []*os.File, opts ...Option) *[]*os.File
- func FileListVar(p *[]*os.File, name string, def []*os.File, opts ...Option)
- func FileVar(p *os.File, name string, def *os.File, opts ...Option)
- func Float32(name string, def float32, opts ...Option) *float32
- func Float32List(name string, def []float32, opts ...Option) *[]float32
- func Float32ListVar(p *[]float32, name string, def []float32, opts ...Option)
- func Float32Var(p *float32, name string, def float32, opts ...Option)
- func Float64(name string, def float64, opts ...Option) *float64
- func Float64List(name string, def []float64, opts ...Option) *[]float64
- func Float64ListVar(p *[]float64, name string, def []float64, opts ...Option)
- func Float64Var(p *float64, name string, def float64, opts ...Option)
- func Func(name string, def func(string) error, opts ...Option) *func(string) error
- func FuncVar(p *func(string) error, name string, def func(string) error, opts ...Option)
- func Int(name string, def int, opts ...Option) *int
- func Int16(name string, def int16, opts ...Option) *int16
- func Int16List(name string, def []int16, opts ...Option) *[]int16
- func Int16ListVar(p *[]int16, name string, def []int16, opts ...Option)
- func Int16Var(p *int16, name string, def int16, opts ...Option)
- func Int32(name string, def int32, opts ...Option) *int32
- func Int32List(name string, def []int32, opts ...Option) *[]int32
- func Int32ListVar(p *[]int32, name string, def []int32, opts ...Option)
- func Int32Var(p *int32, name string, def int32, opts ...Option)
- func Int64(name string, def int64, opts ...Option) *int64
- func Int64List(name string, def []int64, opts ...Option) *[]int64
- func Int64ListVar(p *[]int64, name string, def []int64, opts ...Option)
- func Int64Var(p *int64, name string, def int64, opts ...Option)
- func Int8(name string, def int8, opts ...Option) *int8
- func Int8List(name string, def []int8, opts ...Option) *[]int8
- func Int8ListVar(p *[]int8, name string, def []int8, opts ...Option)
- func Int8Var(p *int8, name string, def int8, opts ...Option)
- func IntList(name string, def []int, opts ...Option) *[]int
- func IntListVar(p *[]int, name string, def []int, opts ...Option)
- func IntVar(p *int, name string, def int, opts ...Option)
- func Lookup(name string) *flag.Flag
- func MustParse()
- func NArg() int
- func NFlag() int
- func Name() string
- func Output() io.Writer
- func Parse() error
- func Set(name, value string)
- func SetErrorHandling(h flag.ErrorHandling)
- func SetOutput(w io.Writer)
- func String(name string, def string, opts ...Option) *string
- func StringList(name string, def []string, opts ...Option) *[]string
- func StringListVar(p *[]string, name string, def []string, opts ...Option)
- func StringVar(p *string, name string, def string, opts ...Option)
- func Uint(name string, def uint, opts ...Option) *uint
- func Uint16(name string, def uint16, opts ...Option) *uint16
- func Uint16List(name string, def []uint16, opts ...Option) *[]uint16
- func Uint16ListVar(p *[]uint16, name string, def []uint16, opts ...Option)
- func Uint16Var(p *uint16, name string, def uint16, opts ...Option)
- func Uint32(name string, def uint32, opts ...Option) *uint32
- func Uint32List(name string, def []uint32, opts ...Option) *[]uint32
- func Uint32ListVar(p *[]uint32, name string, def []uint32, opts ...Option)
- func Uint32Var(p *uint32, name string, def uint32, opts ...Option)
- func Uint64(name string, def uint64, opts ...Option) *uint64
- func Uint64List(name string, def []uint64, opts ...Option) *[]uint64
- func Uint64ListVar(p *[]uint64, name string, def []uint64, opts ...Option)
- func Uint64Var(p *uint64, name string, def uint64, opts ...Option)
- func Uint8(name string, def uint8, opts ...Option) *uint8
- func Uint8List(name string, def []uint8, opts ...Option) *[]uint8
- func Uint8ListVar(p *[]uint8, name string, def []uint8, opts ...Option)
- func Uint8Var(p *uint8, name string, def uint8, opts ...Option)
- func UintList(name string, def []uint, opts ...Option) *[]uint
- func UintListVar(p *[]uint, name string, def []uint, opts ...Option)
- func UintVar(p *uint, name string, def uint, opts ...Option)
- func Usage()
- func Visit(fn func(*Flag))
- type Flag
- type Flagx
- func (f *Flagx) Arg(i int) string
- func (f *Flagx) Args() []string
- func (f *Flagx) Bool(name string, def bool, opts ...Option) *bool
- func (f *Flagx) BoolList(name string, def []bool, opts ...Option) *[]bool
- func (f *Flagx) BoolListVar(p *[]bool, name string, def []bool, opts ...Option)
- func (f *Flagx) BoolVar(p *bool, name string, def bool, opts ...Option)
- func (f *Flagx) Duration(name string, def time.Duration, opts ...Option) *time.Duration
- func (f *Flagx) DurationList(name string, def []time.Duration, opts ...Option) *[]time.Duration
- func (f *Flagx) DurationListVar(p *[]time.Duration, name string, def []time.Duration, opts ...Option)
- func (f *Flagx) DurationVar(p *time.Duration, name string, def time.Duration, opts ...Option)
- func (f *Flagx) ErrorHandling() flag.ErrorHandling
- func (f *Flagx) File(name string, def *os.File, opts ...Option) *os.File
- func (f *Flagx) FileList(name string, def []*os.File, opts ...Option) *[]*os.File
- func (f *Flagx) FileListVar(p *[]*os.File, name string, def []*os.File, opts ...Option)
- func (f *Flagx) FileVar(p *os.File, name string, def *os.File, opts ...Option)
- func (f *Flagx) Float32(name string, def float32, opts ...Option) *float32
- func (f *Flagx) Float32List(name string, def []float32, opts ...Option) *[]float32
- func (f *Flagx) Float32ListVar(p *[]float32, name string, def []float32, opts ...Option)
- func (f *Flagx) Float32Var(p *float32, name string, def float32, opts ...Option)
- func (f *Flagx) Float64(name string, def float64, opts ...Option) *float64
- func (f *Flagx) Float64List(name string, def []float64, opts ...Option) *[]float64
- func (f *Flagx) Float64ListVar(p *[]float64, name string, def []float64, opts ...Option)
- func (f *Flagx) Float64Var(p *float64, name string, def float64, opts ...Option)
- func (f *Flagx) Func(name string, def func(string) error, opts ...Option) *func(string) error
- func (f *Flagx) FuncVar(p *func(string) error, name string, def func(string) error, opts ...Option)
- func (f *Flagx) Int(name string, def int, opts ...Option) *int
- func (f *Flagx) Int16(name string, def int16, opts ...Option) *int16
- func (f *Flagx) Int16List(name string, def []int16, opts ...Option) *[]int16
- func (f *Flagx) Int16ListVar(p *[]int16, name string, def []int16, opts ...Option)
- func (f *Flagx) Int16Var(p *int16, name string, def int16, opts ...Option)
- func (f *Flagx) Int32(name string, def int32, opts ...Option) *int32
- func (f *Flagx) Int32List(name string, def []int32, opts ...Option) *[]int32
- func (f *Flagx) Int32ListVar(p *[]int32, name string, def []int32, opts ...Option)
- func (f *Flagx) Int32Var(p *int32, name string, def int32, opts ...Option)
- func (f *Flagx) Int64(name string, def int64, opts ...Option) *int64
- func (f *Flagx) Int64List(name string, def []int64, opts ...Option) *[]int64
- func (f *Flagx) Int64ListVar(p *[]int64, name string, def []int64, opts ...Option)
- func (f *Flagx) Int64Var(p *int64, name string, def int64, opts ...Option)
- func (f *Flagx) Int8(name string, def int8, opts ...Option) *int8
- func (f *Flagx) Int8List(name string, def []int8, opts ...Option) *[]int8
- func (f *Flagx) Int8ListVar(p *[]int8, name string, def []int8, opts ...Option)
- func (f *Flagx) Int8Var(p *int8, name string, def int8, opts ...Option)
- func (f *Flagx) IntList(name string, def []int, opts ...Option) *[]int
- func (f *Flagx) IntListVar(p *[]int, name string, def []int, opts ...Option)
- func (f *Flagx) IntVar(p *int, name string, def int, opts ...Option)
- func (f *Flagx) Lookup(name string) *flag.Flag
- func (f *Flagx) MustParse()
- func (f *Flagx) NArg() int
- func (f *Flagx) NFlag() int
- func (f *Flagx) Name() string
- func (f *Flagx) Output() io.Writer
- func (f *Flagx) Parse() error
- func (f *Flagx) Set(name, value string) error
- func (f *Flagx) SetErrorHandling(h flag.ErrorHandling)
- func (f *Flagx) SetOutput(w io.Writer)
- func (f *Flagx) String(name string, def string, opts ...Option) *string
- func (f *Flagx) StringList(name string, def []string, opts ...Option) *[]string
- func (f *Flagx) StringListVar(p *[]string, name string, def []string, opts ...Option)
- func (f *Flagx) StringVar(p *string, name string, def string, opts ...Option)
- func (f *Flagx) Uint(name string, def uint, opts ...Option) *uint
- func (f *Flagx) Uint16(name string, def uint16, opts ...Option) *uint16
- func (f *Flagx) Uint16List(name string, def []uint16, opts ...Option) *[]uint16
- func (f *Flagx) Uint16ListVar(p *[]uint16, name string, def []uint16, opts ...Option)
- func (f *Flagx) Uint16Var(p *uint16, name string, def uint16, opts ...Option)
- func (f *Flagx) Uint32(name string, def uint32, opts ...Option) *uint32
- func (f *Flagx) Uint32List(name string, def []uint32, opts ...Option) *[]uint32
- func (f *Flagx) Uint32ListVar(p *[]uint32, name string, def []uint32, opts ...Option)
- func (f *Flagx) Uint32Var(p *uint32, name string, def uint32, opts ...Option)
- func (f *Flagx) Uint64(name string, def uint64, opts ...Option) *uint64
- func (f *Flagx) Uint64List(name string, def []uint64, opts ...Option) *[]uint64
- func (f *Flagx) Uint64ListVar(p *[]uint64, name string, def []uint64, opts ...Option)
- func (f *Flagx) Uint64Var(p *uint64, name string, def uint64, opts ...Option)
- func (f *Flagx) Uint8(name string, def uint8, opts ...Option) *uint8
- func (f *Flagx) Uint8List(name string, def []uint8, opts ...Option) *[]uint8
- func (f *Flagx) Uint8ListVar(p *[]uint8, name string, def []uint8, opts ...Option)
- func (f *Flagx) Uint8Var(p *uint8, name string, def uint8, opts ...Option)
- func (f *Flagx) UintList(name string, def []uint, opts ...Option) *[]uint
- func (f *Flagx) UintListVar(p *[]uint, name string, def []uint, opts ...Option)
- func (f *Flagx) UintVar(p *uint, name string, def uint, opts ...Option)
- func (f *Flagx) Usage()
- func (f *Flagx) Visit(fn func(*Flag))
- type Option
Constants ¶
View Source
const ( ContinueOnError flag.ErrorHandling = 0b1 SkipNoDeclared flag.ErrorHandling = 0b10 OverrideRedefined flag.ErrorHandling = 0b100 )
Variables ¶
View Source
var (
CommandLine = newfgx("", flag.CommandLine)
)
Functions ¶
func DurationList ¶
func DurationListVar ¶
func DurationVar ¶
func ErrorHandling ¶
func ErrorHandling() flag.ErrorHandling
func SetErrorHandling ¶
func SetErrorHandling(h flag.ErrorHandling)
Types ¶
type Flagx ¶
type Flagx struct { UsageFn func() // contains filtered or unexported fields }
func NewNamedFlagx ¶
func (*Flagx) BoolListVar ¶
func (*Flagx) DurationList ¶
func (*Flagx) DurationListVar ¶
func (*Flagx) DurationVar ¶
func (*Flagx) ErrorHandling ¶
func (f *Flagx) ErrorHandling() flag.ErrorHandling
func (*Flagx) FileListVar ¶
func (*Flagx) Float32List ¶
func (*Flagx) Float32ListVar ¶
func (*Flagx) Float32Var ¶
func (*Flagx) Float64List ¶
func (*Flagx) Float64ListVar ¶
func (*Flagx) Float64Var ¶
func (*Flagx) Int16ListVar ¶
func (*Flagx) Int32ListVar ¶
func (*Flagx) Int64ListVar ¶
func (*Flagx) Int8ListVar ¶
func (*Flagx) IntListVar ¶
func (*Flagx) SetErrorHandling ¶
func (f *Flagx) SetErrorHandling(h flag.ErrorHandling)
func (*Flagx) StringList ¶
func (*Flagx) StringListVar ¶
func (*Flagx) Uint16List ¶
func (*Flagx) Uint16ListVar ¶
func (*Flagx) Uint32List ¶
func (*Flagx) Uint32ListVar ¶
func (*Flagx) Uint64List ¶
func (*Flagx) Uint64ListVar ¶
func (*Flagx) Uint8ListVar ¶
func (*Flagx) UintListVar ¶
Click to show internal directories.
Click to hide internal directories.