Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TextMarshalerHookFunc ¶
func TextMarshalerHookFunc() mapstructure.DecodeHookFuncValue
TextMarshalerHookFunc returns a DecodeHookFuncValue that checks for the encoding.TextMarshaler interface and calls the MarshalText function if found.
Types ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
An Encoder takes structured data and converts it into an interface following the mapstructure tags.
type EncoderConfig ¶
type EncoderConfig struct { // EncodeHook, if set, is a way to provide custom encoding. It // will be called before structs and primitive types. EncodeHook mapstructure.DecodeHookFunc }
EncoderConfig is the configuration used to create a new encoder.
Click to show internal directories.
Click to hide internal directories.