Skip to content

Commit d6d59b1

Browse files
authored
Merge pull request #7 from dumim/develop
Checking correct value for panics
2 parents b9d62f1 + 791f1e6 commit d6d59b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

map.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func getMapOfAllKeyValues(s interface{}) *map[string]interface{} {
9797
s := reflect.ValueOf(v)
9898
// iterate through the slice
9999
for i := 0; i < s.Len(); i++ {
100-
if t.Field(i).CanInterface() {
100+
if s.Index(i).CanInterface() {
101101
m := getMapOfAllKeyValues(s.Index(i).Interface()) // get the map value of the object, recursively
102102
if m != nil {
103103
sliceOfMap = append(sliceOfMap, *m) // append to the slice

0 commit comments

Comments
 (0)