mirror of
https://github.com/kataras/iris.git
synced 2025-12-21 20:07:04 +00:00
create one generic package for dependency injection which can be used outside of Iris too - worked but unfished
Former-commit-id: a9d600321c07d7c9f39105416f14ae91528a16a3
This commit is contained in:
@@ -110,6 +110,10 @@ func lookupFields(elemTyp reflect.Type, parentIndex []int) (fields []field) {
|
||||
for i, n := 0, elemTyp.NumField(); i < n; i++ {
|
||||
f := elemTyp.Field(i)
|
||||
|
||||
if f.PkgPath != "" {
|
||||
continue // skip unexported.
|
||||
}
|
||||
|
||||
if indirectTyp(f.Type).Kind() == reflect.Struct &&
|
||||
!structFieldIgnored(f) {
|
||||
fields = append(fields, lookupFields(f.Type, append(parentIndex, i))...)
|
||||
|
||||
Reference in New Issue
Block a user