Skip to content

Commit

Permalink
fix bug: abount dependency injection
Browse files Browse the repository at this point in the history
Former-commit-id: 5538d9ba18a4fd70b90774ef6aaa684d81db4b09
  • Loading branch information
rocinantex committed Mar 23, 2020
1 parent 08403f0 commit 28bb5c5
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 28bb5c5

Please sign in to comment.