fix bug: abount dependency injection

Former-commit-id: edf168d762602658ffb5d452f72048ada8b7156e
This commit is contained in:
rocinantex 2020-03-22 09:04:49 +08:00
parent 264c417f4e
commit 6b8b690d4d

View File

@ -142,7 +142,9 @@ func lookupFields(elem reflect.Value, skipUnexported bool, onlyZeros bool, paren
index = append(parentIndex, i)
}
field.Index = index
tmp := make([]int, len(index))
copy(tmp, index)
field.Index = tmp
fields = append(fields, field)
}