From 2a77d039a01daec589a0f245d7b9ed53aeede4ee Mon Sep 17 00:00:00 2001 From: Godopu Date: Thu, 16 Dec 2021 15:57:48 +0900 Subject: [PATCH] commit 2021-12-16]15:57:46 --- listener.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/listener.go b/listener.go index d826d0b..61aec78 100644 --- a/listener.go +++ b/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))