diff --git a/util.go b/util.go index eedccf6..552585e 100644 --- a/util.go +++ b/util.go @@ -58,6 +58,11 @@ func getNested(field string, aValue reflect.Value) (*reflect.Type, *reflect.Valu if strings.HasPrefix(field, ".") || strings.HasSuffix(field, ".") { return nil, nil, fmt.Errorf(errFmtMalformedField, field) } + value := aValue + if value.Kind() == reflect.Pointer { + value = value.Elem() + } + aft := value.Type() dots := strings.Split(field, ".") if value.Kind() != reflect.Struct /*&& arrRegex.FindString(dots[0]) == ""*/ { if value.Kind() == reflect.Slice {