Skip to content

Commit

Permalink
fix bug: abount dependency injection
Browse files Browse the repository at this point in the history
  • Loading branch information
rocinantex committed Mar 23, 2020
1 parent a1e9813 commit b87659d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hero/di/reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,13 @@ func lookupFields(elemTyp reflect.Type, skipUnexported bool, parentIndex []int)
index = append(parentIndex, i)
}

tmp := make([]int, len(index))
copy(tmp, index)

field := field{
Type: f.Type,
Name: f.Name,
Index: index,
Index: tmp,
CanSet: isExported,
}

Expand Down

0 comments on commit b87659d

Please sign in to comment.