unmarshal: use UnmarshalText for any type (#642)
Not only structs can implement TextUnmarshaler. Fixes #564
This commit is contained in:
@@ -560,10 +560,6 @@ func (d *decoder) handleTablePart(key ast.Iterator, v reflect.Value) (reflect.Va
|
||||
}
|
||||
|
||||
func (d *decoder) tryTextUnmarshaler(node *ast.Node, v reflect.Value) (bool, error) {
|
||||
if v.Kind() != reflect.Struct {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// Special case for time, because we allow to unmarshal to it from
|
||||
// different kind of AST nodes.
|
||||
if v.Type() == timeType {
|
||||
|
||||
Reference in New Issue
Block a user