Skip to content

Commit

Permalink
Merge pull request #7 from dumim/develop
Browse files Browse the repository at this point in the history
Checking correct value for panics
  • Loading branch information
dumim authored Jul 6, 2021
2 parents b9d62f1 + 791f1e6 commit d6d59b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion map.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func getMapOfAllKeyValues(s interface{}) *map[string]interface{} {
s := reflect.ValueOf(v)
// iterate through the slice
for i := 0; i < s.Len(); i++ {
if t.Field(i).CanInterface() {
if s.Index(i).CanInterface() {
m := getMapOfAllKeyValues(s.Index(i).Interface()) // get the map value of the object, recursively
if m != nil {
sliceOfMap = append(sliceOfMap, *m) // append to the slice
Expand Down

0 comments on commit d6d59b1

Please sign in to comment.