Documentation ¶
Index ¶
- func LoadParsers(customParsers map[reflect.Type]Parser) (map[reflect.Type]Parser, error)
- type BoolFlag
- type BoolValue
- type Duration
- func (d *Duration) Get() interface{}
- func (d *Duration) MarshalJSON() ([]byte, error)
- func (d *Duration) MarshalText() ([]byte, error)
- func (d *Duration) Set(s string) error
- func (d *Duration) SetValue(val interface{})
- func (d *Duration) String() string
- func (d *Duration) UnmarshalJSON(text []byte) error
- func (d *Duration) UnmarshalText(text []byte) error
- type Float64Value
- type Int64Value
- type IntValue
- type Parser
- type SliceStrings
- type StringValue
- type TimeValue
- type Uint64Value
- type UintValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BoolFlag ¶
BoolFlag optional interface to indicate boolean flags that can be supplied without "=value" text
type BoolValue ¶
type BoolValue bool
BoolValue bool Value type
type Duration ¶
Duration is a custom type suitable for parsing duration values. It supports `time.ParseDuration`-compatible values and suffix-less digits; in the latter case, seconds are assumed.
func (*Duration) MarshalJSON ¶ added in v1.1.2
MarshalJSON serializes the given duration value.
func (*Duration) MarshalText ¶ added in v1.1.1
MarshalText serialize the given duration value into a text.
func (*Duration) SetValue ¶
func (d *Duration) SetValue(val interface{})
SetValue sets the duration from the given Duration-asserted value.
func (*Duration) UnmarshalJSON ¶ added in v1.1.1
UnmarshalJSON deserializes the given text into a duration value.
func (*Duration) UnmarshalText ¶
UnmarshalText deserializes the given text into a duration value. It is meant to support TOML decoding of durations.
type Float64Value ¶
type Float64Value float64
Float64Value float64 Value
func (*Float64Value) Set ¶
func (f *Float64Value) Set(s string) error
Set sets float64 value from the given string value.
func (*Float64Value) SetValue ¶
func (f *Float64Value) SetValue(val interface{})
SetValue sets the Float64Value from the given float64-asserted value.
func (*Float64Value) String ¶
func (f *Float64Value) String() string
type Int64Value ¶
type Int64Value int64
Int64Value int64 Value
func (*Int64Value) Set ¶
func (i *Int64Value) Set(s string) error
Set sets int64 value from the given string value.
func (*Int64Value) SetValue ¶
func (i *Int64Value) SetValue(val interface{})
SetValue sets the Int64Value from the given int64-asserted value.
func (*Int64Value) String ¶
func (i *Int64Value) String() string
type IntValue ¶
type IntValue int
IntValue int Value
type SliceStrings ¶
type SliceStrings []string
SliceStrings parse slice of strings
func (*SliceStrings) Set ¶
func (s *SliceStrings) Set(str string) error
Set adds strings elem into the the parser. It splits str on , and ;
func (*SliceStrings) SetValue ¶
func (s *SliceStrings) SetValue(val interface{})
SetValue sets []string into the parser
func (*SliceStrings) String ¶
func (s *SliceStrings) String() string
String return slice in a string
type StringValue ¶
type StringValue string
StringValue string Value
func (*StringValue) Set ¶
func (s *StringValue) Set(val string) error
Set sets string value from the given string value.
func (*StringValue) SetValue ¶
func (s *StringValue) SetValue(val interface{})
SetValue sets the StringValue from the given string-asserted value.
func (*StringValue) String ¶
func (s *StringValue) String() string
type TimeValue ¶
TimeValue time.Time Value
type Uint64Value ¶
type Uint64Value uint64
Uint64Value uint64 Value
func (*Uint64Value) Set ¶
func (i *Uint64Value) Set(s string) error
Set sets uint64 value from the given string value.
func (*Uint64Value) SetValue ¶
func (i *Uint64Value) SetValue(val interface{})
SetValue sets the Uint64Value from the given uint64-asserted value.
func (*Uint64Value) String ¶
func (i *Uint64Value) String() string