Documentation
¶
Index ¶
- Constants
- type Argument
- type ArgumentBase
- type ArgumentFloat32
- type ArgumentFloat32Slice
- type ArgumentFloat64
- type ArgumentFloat64Slice
- type ArgumentInt
- type ArgumentInt8
- type ArgumentInt8Slice
- type ArgumentInt16
- type ArgumentInt16Slice
- type ArgumentInt32
- type ArgumentInt32Slice
- type ArgumentInt64
- type ArgumentInt64Slice
- type ArgumentIntSlice
- type ArgumentString
- type ArgumentStringSlice
- type ArgumentTimestamp
- type ArgumentTimestampSlice
- type ArgumentUint
- type ArgumentUint8
- type ArgumentUint8Slice
- type ArgumentUint16
- type ArgumentUint16Slice
- type ArgumentUint32
- type ArgumentUint32Slice
- type ArgumentUint64
- type ArgumentUint64Slice
- type ArgumentUintSlice
- type ArgumentsBase
- type BoolFlag
- type Extend
- type Flag
- type Float64Flag
- type Float64SliceFlag
- type Int64Flag
- type Int64SliceFlag
- type IntFlag
- type IntSliceFlag
- type StringFlag
- type StringSliceFlag
Constants ¶
View Source
const ( FlagTypeBool = "bool" FlagTypeFloat64 = "float64" FlagTypeFloat64Slice = "float64_slice" FlagTypeInt = "int" FlagTypeIntSlice = "int_slice" FlagTypeInt64 = "int64" FlagTypeInt64Slice = "int64_slice" FlagTypeString = "string" FlagTypeStringSlice = "string_slice" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgumentBase ¶
type ArgumentBase[T any] struct { Name string // the name of this argument Default T // the default value of this argument Usage string // the usage text to show Required bool // if this argument is required }
func (*ArgumentBase[T]) GetMax ¶
func (a *ArgumentBase[T]) GetMax() int
func (*ArgumentBase[T]) GetMin ¶
func (a *ArgumentBase[T]) GetMin() int
func (*ArgumentBase[T]) GetName ¶
func (a *ArgumentBase[T]) GetName() string
func (*ArgumentBase[T]) GetValue ¶
func (a *ArgumentBase[T]) GetValue() any
type ArgumentFloat32 ¶
type ArgumentFloat32 = ArgumentBase[float32]
type ArgumentFloat32Slice ¶
type ArgumentFloat32Slice = ArgumentsBase[float32]
type ArgumentFloat64 ¶
type ArgumentFloat64 = ArgumentBase[float64]
type ArgumentFloat64Slice ¶
type ArgumentFloat64Slice = ArgumentsBase[float64]
type ArgumentInt ¶
type ArgumentInt = ArgumentBase[int]
type ArgumentInt8 ¶
type ArgumentInt8 = ArgumentBase[int8]
type ArgumentInt8Slice ¶
type ArgumentInt8Slice = ArgumentsBase[int8]
type ArgumentInt16 ¶
type ArgumentInt16 = ArgumentBase[int16]
type ArgumentInt16Slice ¶
type ArgumentInt16Slice = ArgumentsBase[int16]
type ArgumentInt32 ¶
type ArgumentInt32 = ArgumentBase[int32]
type ArgumentInt32Slice ¶
type ArgumentInt32Slice = ArgumentsBase[int32]
type ArgumentInt64 ¶
type ArgumentInt64 = ArgumentBase[int64]
type ArgumentInt64Slice ¶
type ArgumentInt64Slice = ArgumentsBase[int64]
type ArgumentIntSlice ¶
type ArgumentIntSlice = ArgumentsBase[int]
type ArgumentString ¶
type ArgumentString = ArgumentBase[string]
type ArgumentStringSlice ¶
type ArgumentStringSlice = ArgumentsBase[string]
type ArgumentTimestamp ¶
type ArgumentTimestamp struct {
Name string // the name of this argument
Value time.Time // the default value of this argument
Usage string // the usage text to show
Required bool // if this argument is required
// Available layouts for timestamp value.
// Note that value for formats with missing year/date will be interpreted as current year/date respectively.
// Read more about time layouts: https://pkg.go.dev/time#pkg-constants
Layouts []string
}
func (*ArgumentTimestamp) GetMax ¶
func (a *ArgumentTimestamp) GetMax() int
func (*ArgumentTimestamp) GetMin ¶
func (a *ArgumentTimestamp) GetMin() int
func (*ArgumentTimestamp) GetName ¶
func (a *ArgumentTimestamp) GetName() string
func (*ArgumentTimestamp) GetValue ¶
func (a *ArgumentTimestamp) GetValue() any
type ArgumentTimestampSlice ¶
type ArgumentTimestampSlice struct {
Name string // the name of this argument
Value time.Time // the default value of this argument
Usage string // the usage text to show
Min int // the min num of occurrences of this argument
Max int // the max num of occurrences of this argument, set to -1 for unlimited
// Available layouts for timestamp value.
// Note that value for formats with missing year/date will be interpreted as current year/date respectively.
// Read more about time layouts: https://pkg.go.dev/time#pkg-constants
Layouts []string
}
func (*ArgumentTimestampSlice) GetMax ¶
func (a *ArgumentTimestampSlice) GetMax() int
func (*ArgumentTimestampSlice) GetMin ¶
func (a *ArgumentTimestampSlice) GetMin() int
func (*ArgumentTimestampSlice) GetName ¶
func (a *ArgumentTimestampSlice) GetName() string
func (*ArgumentTimestampSlice) GetValue ¶
func (a *ArgumentTimestampSlice) GetValue() any
type ArgumentUint ¶
type ArgumentUint = ArgumentBase[uint]
type ArgumentUint8 ¶
type ArgumentUint8 = ArgumentBase[uint8]
type ArgumentUint8Slice ¶
type ArgumentUint8Slice = ArgumentsBase[uint8]
type ArgumentUint16 ¶
type ArgumentUint16 = ArgumentBase[uint16]
type ArgumentUint16Slice ¶
type ArgumentUint16Slice = ArgumentsBase[uint16]
type ArgumentUint32 ¶
type ArgumentUint32 = ArgumentBase[uint32]
type ArgumentUint32Slice ¶
type ArgumentUint32Slice = ArgumentsBase[uint32]
type ArgumentUint64 ¶
type ArgumentUint64 = ArgumentBase[uint64]
type ArgumentUint64Slice ¶
type ArgumentUint64Slice = ArgumentsBase[uint64]
type ArgumentUintSlice ¶
type ArgumentUintSlice = ArgumentsBase[uint]
type ArgumentsBase ¶
type ArgumentsBase[T any] struct { Name string // the name of this argument Default []T // the default value of this argument Usage string // the usage text to show Min int // the min num of occurrences of this argument Max int // the max num of occurrences of this argument, set to -1 for unlimited }
func (*ArgumentsBase[T]) GetMax ¶
func (a *ArgumentsBase[T]) GetMax() int
func (*ArgumentsBase[T]) GetMin ¶
func (a *ArgumentsBase[T]) GetMin() int
func (*ArgumentsBase[T]) GetName ¶
func (a *ArgumentsBase[T]) GetName() string
func (*ArgumentsBase[T]) GetValue ¶
func (a *ArgumentsBase[T]) GetValue() any
type BoolFlag ¶
type Float64Flag ¶
func (*Float64Flag) Type ¶
func (receiver *Float64Flag) Type() string
type Float64SliceFlag ¶
type Float64SliceFlag struct {
Name string
Usage string
Aliases []string
Value []float64
Required bool
}
func (*Float64SliceFlag) Type ¶
func (receiver *Float64SliceFlag) Type() string
type Int64SliceFlag ¶
type Int64SliceFlag struct {
Name string
Usage string
Aliases []string
Value []int64
Required bool
}
func (*Int64SliceFlag) Type ¶
func (receiver *Int64SliceFlag) Type() string
type IntSliceFlag ¶
func (*IntSliceFlag) Type ¶
func (receiver *IntSliceFlag) Type() string
type StringFlag ¶
func (*StringFlag) Type ¶
func (receiver *StringFlag) Type() string
Click to show internal directories.
Click to hide internal directories.