Skip to content

Commit

Permalink
Merge pull request #6 from dumim/develop
Browse files Browse the repository at this point in the history
Panic check added
  • Loading branch information
dumim authored Jul 6, 2021
2 parents a484ec6 + a6786fb commit b9d62f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion map.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ func getMapOfAllKeyValues(s interface{}) *map[string]interface{} {
for i := 0; i < s.Len(); i++ {
if t.Field(i).CanInterface() {
m := getMapOfAllKeyValues(s.Index(i).Interface()) // get the map value of the object, recursively
sliceOfMap = append(sliceOfMap, *m) // append to the slice
if m != nil {
sliceOfMap = append(sliceOfMap, *m) // append to the slice
}
}
}
finalMap[k] = sliceOfMap
Expand Down

0 comments on commit b9d62f1

Please sign in to comment.