Documentation
¶
Index ¶
- Constants
- type Argument
- type ArgumentBase
- type ArgumentFloat32
- type ArgumentFloat32Slice
- type ArgumentFloat64
- type ArgumentFloat64Slice
- type ArgumentInt
- type ArgumentInt16
- type ArgumentInt16Slice
- type ArgumentInt32
- type ArgumentInt32Slice
- type ArgumentInt64
- type ArgumentInt64Slice
- type ArgumentInt8
- type ArgumentInt8Slice
- type ArgumentIntSlice
- type ArgumentString
- type ArgumentStringSlice
- type ArgumentTimestamp
- type ArgumentTimestampSlice
- type ArgumentUint
- type ArgumentUint16
- type ArgumentUint16Slice
- type ArgumentUint32
- type ArgumentUint32Slice
- type ArgumentUint64
- type ArgumentUint64Slice
- type ArgumentUint8
- type ArgumentUint8Slice
- 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 ¶ added in v1.17.0
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 ¶ added in v1.17.0
func (a *ArgumentBase[T]) GetMax() int
func (*ArgumentBase[T]) GetMin ¶ added in v1.17.0
func (a *ArgumentBase[T]) GetMin() int
func (*ArgumentBase[T]) GetName ¶ added in v1.17.0
func (a *ArgumentBase[T]) GetName() string
func (*ArgumentBase[T]) GetValue ¶ added in v1.17.0
func (a *ArgumentBase[T]) GetValue() any
type ArgumentFloat32 ¶ added in v1.17.0
type ArgumentFloat32 = ArgumentBase[float32]
type ArgumentFloat32Slice ¶ added in v1.17.0
type ArgumentFloat32Slice = ArgumentsBase[float32]
type ArgumentFloat64 ¶ added in v1.17.0
type ArgumentFloat64 = ArgumentBase[float64]
type ArgumentFloat64Slice ¶ added in v1.17.0
type ArgumentFloat64Slice = ArgumentsBase[float64]
type ArgumentInt ¶ added in v1.17.0
type ArgumentInt = ArgumentBase[int]
type ArgumentInt16 ¶ added in v1.17.0
type ArgumentInt16 = ArgumentBase[int16]
type ArgumentInt16Slice ¶ added in v1.17.0
type ArgumentInt16Slice = ArgumentsBase[int16]
type ArgumentInt32 ¶ added in v1.17.0
type ArgumentInt32 = ArgumentBase[int32]
type ArgumentInt32Slice ¶ added in v1.17.0
type ArgumentInt32Slice = ArgumentsBase[int32]
type ArgumentInt64 ¶ added in v1.17.0
type ArgumentInt64 = ArgumentBase[int64]
type ArgumentInt64Slice ¶ added in v1.17.0
type ArgumentInt64Slice = ArgumentsBase[int64]
type ArgumentInt8 ¶ added in v1.17.0
type ArgumentInt8 = ArgumentBase[int8]
type ArgumentInt8Slice ¶ added in v1.17.0
type ArgumentInt8Slice = ArgumentsBase[int8]
type ArgumentIntSlice ¶ added in v1.17.0
type ArgumentIntSlice = ArgumentsBase[int]
type ArgumentString ¶ added in v1.17.0
type ArgumentString = ArgumentBase[string]
type ArgumentStringSlice ¶ added in v1.17.0
type ArgumentStringSlice = ArgumentsBase[string]
type ArgumentTimestamp ¶ added in v1.17.0
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 ¶ added in v1.17.0
func (a *ArgumentTimestamp) GetMax() int
func (*ArgumentTimestamp) GetMin ¶ added in v1.17.0
func (a *ArgumentTimestamp) GetMin() int
func (*ArgumentTimestamp) GetName ¶ added in v1.17.0
func (a *ArgumentTimestamp) GetName() string
func (*ArgumentTimestamp) GetValue ¶ added in v1.17.0
func (a *ArgumentTimestamp) GetValue() any
type ArgumentTimestampSlice ¶ added in v1.17.0
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 ¶ added in v1.17.0
func (a *ArgumentTimestampSlice) GetMax() int
func (*ArgumentTimestampSlice) GetMin ¶ added in v1.17.0
func (a *ArgumentTimestampSlice) GetMin() int
func (*ArgumentTimestampSlice) GetName ¶ added in v1.17.0
func (a *ArgumentTimestampSlice) GetName() string
func (*ArgumentTimestampSlice) GetValue ¶ added in v1.17.0
func (a *ArgumentTimestampSlice) GetValue() any
type ArgumentUint ¶ added in v1.17.0
type ArgumentUint = ArgumentBase[uint]
type ArgumentUint16 ¶ added in v1.17.0
type ArgumentUint16 = ArgumentBase[uint16]
type ArgumentUint16Slice ¶ added in v1.17.0
type ArgumentUint16Slice = ArgumentsBase[uint16]
type ArgumentUint32 ¶ added in v1.17.0
type ArgumentUint32 = ArgumentBase[uint32]
type ArgumentUint32Slice ¶ added in v1.17.0
type ArgumentUint32Slice = ArgumentsBase[uint32]
type ArgumentUint64 ¶ added in v1.17.0
type ArgumentUint64 = ArgumentBase[uint64]
type ArgumentUint64Slice ¶ added in v1.17.0
type ArgumentUint64Slice = ArgumentsBase[uint64]
type ArgumentUint8 ¶ added in v1.17.0
type ArgumentUint8 = ArgumentBase[uint8]
type ArgumentUint8Slice ¶ added in v1.17.0
type ArgumentUint8Slice = ArgumentsBase[uint8]
type ArgumentUintSlice ¶ added in v1.17.0
type ArgumentUintSlice = ArgumentsBase[uint]
type ArgumentsBase ¶ added in v1.17.0
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 ¶ added in v1.17.0
func (a *ArgumentsBase[T]) GetMax() int
func (*ArgumentsBase[T]) GetMin ¶ added in v1.17.0
func (a *ArgumentsBase[T]) GetMin() int
func (*ArgumentsBase[T]) GetName ¶ added in v1.17.0
func (a *ArgumentsBase[T]) GetName() string
func (*ArgumentsBase[T]) GetValue ¶ added in v1.17.0
func (a *ArgumentsBase[T]) GetValue() any
type BoolFlag ¶ added in v1.12.0
type Float64Flag ¶ added in v1.12.0
func (*Float64Flag) Type ¶ added in v1.12.0
func (receiver *Float64Flag) Type() string
type Float64SliceFlag ¶ added in v1.12.0
type Float64SliceFlag struct {
Name string
Usage string
Aliases []string
Value []float64
Required bool
}
func (*Float64SliceFlag) Type ¶ added in v1.12.0
func (receiver *Float64SliceFlag) Type() string
type Int64SliceFlag ¶ added in v1.12.0
type Int64SliceFlag struct {
Name string
Usage string
Aliases []string
Value []int64
Required bool
}
func (*Int64SliceFlag) Type ¶ added in v1.12.0
func (receiver *Int64SliceFlag) Type() string
type IntSliceFlag ¶ added in v1.12.0
func (*IntSliceFlag) Type ¶ added in v1.12.0
func (receiver *IntSliceFlag) Type() string
type StringFlag ¶ added in v1.12.0
func (*StringFlag) Type ¶ added in v1.12.0
func (receiver *StringFlag) Type() string
Click to show internal directories.
Click to hide internal directories.