Skip to content
Snippets Groups Projects
Verified Commit 124e8b9d authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix invalid type exception

parent 4651925b
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,10 @@ func getValueFrom[D any](obj D, keyWithDots string) (interface{}, error) {
v = v.FieldByName(key)
}
if v.Kind() == reflect.Invalid {
return nil, newInvalidPathError(keyWithDots)
}
for v.Kind() == reflect.Ptr {
v = v.Elem()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment