Skip to content

Commit

Permalink
Fix: fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
fangyincheng committed Oct 30, 2020
1 parent 1d7a25e commit cd14775
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions filter/filter_impl/generic_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,15 @@ func struct2MapAll(obj interface{}) interface{} {
for i := 0; i < t.NumField(); i++ {
switch v.Field(i).Kind() {
case reflect.Struct:
if v.Field(i).Type().String() == "time.Time" {
setInMap(result, t.Field(i), v.Field(i).Interface())
break
}
fallthrough
case reflect.Slice | reflect.Map:
case reflect.Slice:
fallthrough
case reflect.Map:
if v.Field(i).CanInterface() {
if v.Field(i).Type().String() == "time.Time" {
setInMap(result, t.Field(i), v.Field(i).Interface())
break
}
setInMap(result, t.Field(i), struct2MapAll(v.Field(i).Interface()))
}
break
Expand Down

0 comments on commit cd14775

Please sign in to comment.