Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TextUnmarshaller is the type of encoding.TextUnmarshaler TextUnmarshaller = Unmarshalers[0] // BinaryUnmarshaler is the type of encoding.BinaryUnmarshaler BinaryUnmarshaler = Unmarshalers[1] // JSONUnmarshaler is the type of json.Unmarshaler JSONUnmarshaler = Unmarshalers[2] )
Custom is the list of custom types supported.
View Source
var Native = map[reflect.Kind]bool{ reflect.String: true, reflect.Bool: true, reflect.Int: true, reflect.Int8: true, reflect.Int16: true, reflect.Int32: true, reflect.Int64: true, reflect.Uint: true, reflect.Uint8: true, reflect.Uint16: true, reflect.Uint32: true, reflect.Uint64: true, reflect.Float32: true, reflect.Float64: true, }
Native is the list of supported native types.
View Source
var Unmarshalers = []reflect.Type{ reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem(), reflect.TypeOf((*encoding.BinaryUnmarshaler)(nil)).Elem(), reflect.TypeOf((*json.Unmarshaler)(nil)).Elem(), }
Unmarshalers is the list of possible unmarshaler kcd support.
Functions ¶
func IsCustomType ¶
IsCustomType check the type is a custom type.
func IsImplementingUnmarshaler ¶
IsImplementingUnmarshaler check if the type t implement one of the possible unmarshalers.
func IsUnmarshallable ¶
IsUnmarshallable check if the type t is either a native, custom type or implement an unmarshaler.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.