Documentation
¶
Index ¶
- func AnyToPointerHook() mapstructure.DecodeHookFunc
- func DefaultDecodeHook() mapstructure.DecodeHookFunc
- func DefaultDecodeHookWithTimeFormats(formats ...string) mapstructure.DecodeHookFunc
- func StringToIPHook() mapstructure.DecodeHookFunc
- func StringToTextUnmarshalerHook() mapstructure.DecodeHookFunc
- func StringToTimeHook() mapstructure.DecodeHookFunc
- func StringToTimeHookWithFormats(formats ...string) mapstructure.DecodeHookFunc
- func StringToURLHook() mapstructure.DecodeHookFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyToPointerHook ¶
func AnyToPointerHook() mapstructure.DecodeHookFunc
AnyToPointerHook handles conversion to pointer types.
func DefaultDecodeHook ¶
func DefaultDecodeHook() mapstructure.DecodeHookFunc
DefaultDecodeHook returns the default DecodeHook with support for: - time.Duration (via mapstructure built-in) - []string from comma-separated strings (via mapstructure built-in) - time.Time from RFC3339 strings - url.URL from strings - net.IP from strings - encoding.TextUnmarshaler types - Pointer types.
func DefaultDecodeHookWithTimeFormats ¶
func DefaultDecodeHookWithTimeFormats(formats ...string) mapstructure.DecodeHookFunc
DefaultDecodeHookWithTimeFormats returns a DecodeHook with custom time formats. Formats are tried in order until one succeeds.
func StringToIPHook ¶
func StringToIPHook() mapstructure.DecodeHookFunc
StringToIPHook converts string to net.IP.
func StringToTextUnmarshalerHook ¶
func StringToTextUnmarshalerHook() mapstructure.DecodeHookFunc
StringToTextUnmarshalerHook converts string to any type implementing encoding.TextUnmarshaler.
func StringToTimeHook ¶
func StringToTimeHook() mapstructure.DecodeHookFunc
StringToTimeHook converts string to time.Time using RFC3339 format.
func StringToTimeHookWithFormats ¶
func StringToTimeHookWithFormats(formats ...string) mapstructure.DecodeHookFunc
StringToTimeHookWithFormats converts string to time.Time using multiple formats. Formats are tried in order until one succeeds.
func StringToURLHook ¶
func StringToURLHook() mapstructure.DecodeHookFunc
StringToURLHook converts string to url.URL.
Types ¶
This section is empty.