Documentation
¶
Overview ¶
configure file of key=value parse library.
supported decode data to struct by reflact library, you can add "kv" tag in struct to ensure the correct keys.
you can define a custom Marshaler and Unmarshaler interface to process data by yourself.
supported decode and encode key in structure split in "." char.
supported value types:
interface{}
map[string]interface{}
struct by tag kv
map[string]<all of basic types>
basic types:
int, int8, int16, int32, int64 uint, uint8, uint16, uint32, uint64 float32, float64 bool string
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder unmarshal decoder
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder marshal encoder
type Marshaler ¶
Marshaler custom marshaler interface, the returned string value is the encoded value to write
type Unmarshaler ¶
Unmarshaler custom unmarshaler interface, the param of UnmarshalKV function is the value from input
type UnsupportedTypeError ¶
UnsupportedTypeError error for unsupported type
func (*UnsupportedTypeError) Error ¶
func (e *UnsupportedTypeError) Error() string
Error error message