1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-24 05:17:03 +00:00

Add mvc.Application.EnableStructDependents() and app.ConfigureContainer().EnableStructDependents()

relative to: #2158
This commit is contained in:
Gerasimos (Makis) Maropoulos
2023-07-17 18:30:45 +03:00
parent 6add1ba49b
commit d254d48f34
11 changed files with 85 additions and 34 deletions

View File

@@ -154,6 +154,10 @@ func lookupFields(elem reflect.Value, skipUnexported bool, onlyZeros bool, paren
// Note: embedded pointers are not supported.
// elem = reflect.Indirect(elem)
elemTyp := elem.Type()
if elemTyp.Kind() == reflect.Pointer {
return
}
for i, n := 0, elem.NumField(); i < n; i++ {
field := elemTyp.Field(i)
fieldValue := elem.Field(i)