Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array []string
Array is a flag that holds an array of values.
It may be set either by specifying multiple flags with the given name passed to NewArray or by joining flag values by comma.
The following example sets equivalent flag array with two items (value1, value2):
-foo=value1 -foo=value2 -foo=value1,value2
Flag values may be quoted. For instance, the following arg creates an array of ("a", "b, c") items:
-foo='a,"b, c"'
func (*Array) GetOptionalArg ¶ added in v1.35.3
GetOptionalArg returns optional arg under the given argIdx.
type Bytes ¶ added in v1.40.1
type Bytes struct { // N contains parsed value for the given flag. N int // contains filtered or unexported fields }
Bytes is a flag for holding size in bytes.
It supports the following optional suffixes for values: KB, MB, GB, KiB, MiB, GiB.
func NewBytes ¶ added in v1.40.1
NewBytes returns new `bytes` flag with the given name, defaultValue and description.
Click to show internal directories.
Click to hide internal directories.