commit 2021-12-16]15:57:46
This commit is contained in:
parent
ce91a11c5a
commit
2a77d039a0
10
listener.go
10
listener.go
@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"reflect"
|
||||
"sync"
|
||||
)
|
||||
|
||||
@ -19,6 +20,15 @@ func compareMap(src map[string]interface{}, dst map[string]interface{}) bool {
|
||||
if key == "code" {
|
||||
continue
|
||||
}
|
||||
|
||||
if reflect.TypeOf(value).String() == "string" {
|
||||
dstV, ok := dst[key].(string)
|
||||
if !ok || value != dstV {
|
||||
return false
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
srcV, ok := value.(int)
|
||||
if !ok {
|
||||
srcV = int(value.(float64))
|
||||
|
Loading…
Reference in New Issue
Block a user