Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultValue ¶
Types ¶
type BoolValue ¶
type BoolValue bool
BoolValue is a flag.Value type holding boolean values
type BoolValued ¶
type BoolValued interface { flag.Value // IsBoolFlag should return true to indicate that this value is a bool value IsBoolFlag() bool }
BoolValued is an interface values can implement to indicate that they are a bool option, i.e. can be set without providing a value with just -f for example
type DefaultValued ¶
type DefaultValued interface { // IsDefault should return true if the value stored is the default value, and thus does not need be shown in the help message IsDefault() bool }
DefaultValued in an interface to determine if the value stored is the default value, and thus does not need be shown in the help message
type Float64Value ¶
type Float64Value float64
Float64Value is a flag.Value type holding int values
func NewFloat64 ¶
func NewFloat64(into *float64, v float64) *Float64Value
NewFloat64 creates a new int value
func (*Float64Value) Set ¶
func (ia *Float64Value) Set(s string) error
Set sets the value from a provided string
func (*Float64Value) String ¶
func (ia *Float64Value) String() string
type Floats64Value ¶
type Floats64Value []float64
Floats64Value is a flag.Value type holding int values
func NewFloats64 ¶
func NewFloats64(into *[]float64, v []float64) *Floats64Value
NewFloats64 creates a new multi-int value
func (*Floats64Value) IsDefault ¶
func (ia *Floats64Value) IsDefault() bool
IsDefault return true if the int slice is empty
func (*Floats64Value) Set ¶
func (ia *Floats64Value) Set(s string) error
Set sets the value from a provided string
func (*Floats64Value) String ¶
func (ia *Floats64Value) String() string
type IntValue ¶
type IntValue int
IntValue is a flag.Value type holding int values
type IntsValue ¶
type IntsValue []int
IntsValue is a flag.Value type holding int values
type MultiValued ¶
MultiValued is an interface ti indicate that a value can hold multiple values
type StringValue ¶
type StringValue string
StringValue is a flag.Value type holding string values
func NewString ¶
func NewString(into *string, v string) *StringValue
NewString creates a new string value
func (*StringValue) IsDefault ¶
func (sa *StringValue) IsDefault() bool
IsDefault return true if the string value is empty
func (*StringValue) Set ¶
func (sa *StringValue) Set(s string) error
Set sets the value from a provided string
func (*StringValue) String ¶
func (sa *StringValue) String() string
type StringsValue ¶
type StringsValue []string
StringsValue is a flag.Value type holding string slices values
func NewStrings ¶
func NewStrings(into *[]string, v []string) *StringsValue
NewStrings creates a new multi-string value
func (*StringsValue) IsDefault ¶
func (sa *StringsValue) IsDefault() bool
IsDefault return true if the string slice is empty
func (*StringsValue) Set ¶
func (sa *StringsValue) Set(s string) error
Set sets the value from a provided string
func (*StringsValue) String ¶
func (sa *StringsValue) String() string