Documentation ¶
Index ¶
Constants ¶
const DEFAULT_SECTION = "default"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MapSlice ¶
type MapSlice []MapItem
MapSlice encodes and decodes as a INI map. The order of keys is preserved when encoding and decoding.
type Marshaler ¶
type Marshaler interface {
MarshalINI() (interface{}, error)
}
The Marshaler interface may be implemented by types to customize their behavior when being marshaled into a INI document. The returned value is marshaled in place of the original value implementing Marshaler.
If an error is returned by MarshalINI, the marshaling procedure stops and returns with the provided error.
type TypeError ¶
type TypeError struct {
Errors []string
}
A TypeError is returned by Unmarshal when one or more fields in the INI document cannot be properly decoded into the requested types. When this error is returned, the value is still unmarshaled partially.
type Unmarshaler ¶
The Unmarshaler interface may be implemented by types to customize their behavior when being unmarshaled from a INI document. The UnmarshalINI method receives a function that may be called to unmarshal the original INI value into a field or variable. It is safe to call the unmarshal function parameter more than once if necessary.