fix bug: abount dependency injection

Former-commit-id: 5538d9ba18a4fd70b90774ef6aaa684d81db4b09
This commit is contained in:
rocinantex 2020-03-23 16:22:34 +08:00
parent 08403f0317
commit 28bb5c51bb

View File

@ -229,10 +229,13 @@ func lookupFields(elemTyp reflect.Type, skipUnexported bool, parentIndex []int)
index = append(parentIndex, i) index = append(parentIndex, i)
} }
tmp := make([]int, len(index))
copy(tmp, index)
field := field{ field := field{
Type: f.Type, Type: f.Type,
Name: f.Name, Name: f.Name,
Index: index, Index: tmp,
CanSet: isExported, CanSet: isExported,
} }