Skip to content

Commit

Permalink
Merge pull request #1475 from rocinantex/v12
Browse files Browse the repository at this point in the history
fix bug: abount dependency injection
  • Loading branch information
kataras authored Mar 23, 2020
2 parents a1e9813 + b87659d commit b6ac394
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 b6ac394

Please sign in to comment.