update getNested utility to better handle slice fields

This commit is contained in:
parent 5a8f2301fc
commit e018dad91e
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -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 {