commit 2021-12-16]15:57:46

This commit is contained in:
Godopu 2021-12-16 15:57:48 +09:00
parent ce91a11c5a
commit 2a77d039a0

View File

@ -4,6 +4,7 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"log" "log"
"reflect"
"sync" "sync"
) )
@ -19,6 +20,15 @@ func compareMap(src map[string]interface{}, dst map[string]interface{}) bool {
if key == "code" { if key == "code" {
continue continue
} }
if reflect.TypeOf(value).String() == "string" {
dstV, ok := dst[key].(string)
if !ok || value != dstV {
return false
}
continue
}
srcV, ok := value.(int) srcV, ok := value.(int)
if !ok { if !ok {
srcV = int(value.(float64)) srcV = int(value.(float64))