From 313a3b1627a988fb306bbde7756c2552b8cb30d2 Mon Sep 17 00:00:00 2001 From: atjhoendz Date: Fri, 10 May 2024 13:45:17 +0700 Subject: [PATCH 1/4] misc: upgrade nats client --- go.mod | 15 +++++++-------- go.sum | 34 ++++++++++++++-------------------- 2 files changed, 21 insertions(+), 28 deletions(-) diff --git a/go.mod b/go.mod index 790be3f..c9ccd5e 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.22 require ( github.com/kumparan/tapao v1.2.0 - github.com/nats-io/nats.go v1.16.0 + github.com/nats-io/nats.go v1.34.1 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.9.0 @@ -17,10 +17,9 @@ require ( github.com/cockroachdb/apd v1.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/getsentry/sentry-go v0.11.0 // indirect - github.com/golang/protobuf v1.5.2 // indirect github.com/goodsign/monday v1.0.0 // indirect github.com/gorilla/css v1.0.0 // indirect - github.com/klauspost/compress v1.13.4 // indirect + github.com/klauspost/compress v1.17.2 // indirect github.com/leekchan/accounting v0.3.1 // indirect github.com/microcosm-cc/bluemonday v1.0.19 // indirect github.com/minio/highwayhash v1.0.1 // indirect @@ -30,8 +29,8 @@ require ( github.com/shopspring/decimal v1.2.0 // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - golang.org/x/sys v0.1.0 // indirect - golang.org/x/text v0.4.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -40,9 +39,9 @@ require ( github.com/graph-gophers/graphql-go v1.4.0 // indirect github.com/kumparan/go-utils v1.25.1 github.com/nats-io/nats-server/v2 v2.7.0 - github.com/nats-io/nkeys v0.3.0 // indirect + github.com/nats-io/nkeys v0.4.7 // indirect github.com/nats-io/nuid v1.0.1 // indirect - golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce // indirect - golang.org/x/net v0.1.0 // indirect + golang.org/x/crypto v0.18.0 // indirect + golang.org/x/net v0.10.0 // indirect google.golang.org/grpc v1.27.1 // indirect ) diff --git a/go.sum b/go.sum index 44f0467..26c1656 100644 --- a/go.sum +++ b/go.sum @@ -53,11 +53,6 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/goodsign/monday v1.0.0 h1:Yyk/s/WgudMbAJN6UWSU5xAs8jtNewfqtVblAlw0yoc= github.com/goodsign/monday v1.0.0/go.mod h1:r4T4breXpoFwspQNM+u2sLxJb2zyTaxVGqUfTBjWOu8= @@ -94,8 +89,8 @@ github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7 github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.13.4 h1:0zhec2I8zGnjWcKyLl6i3gPqKANCCn5e9xmviEEeX6s= -github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= +github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -137,11 +132,12 @@ github.com/nats-io/jwt/v2 v2.2.1-0.20220113022732-58e87895b296/go.mod h1:0tqz9Hl github.com/nats-io/nats-server/v2 v2.7.0 h1:UpqcAM93FI7AHlCyI2FD5QcV3QuHNCauQF2LBVU0238= github.com/nats-io/nats-server/v2 v2.7.0/go.mod h1:cjxtMhZsZovK1XS2iiapCduR8HuqB/YpFamL0qntIcw= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nats.go v1.16.0 h1:zvLE7fGBQYW6MWaFaRdsgm9qT39PJDQoju+DS8KsO1g= -github.com/nats-io/nats.go v1.16.0/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= +github.com/nats-io/nats.go v1.34.1 h1:syWey5xaNHZgicYBemv0nohUPPmaLteiBEUT6Q5+F/4= +github.com/nats-io/nats.go v1.34.1/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= +github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI= +github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= @@ -216,8 +212,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce h1:Roh6XWxHFKrPgC/EQhVubSAGQ6Ozk6IdxHSzt1mR0EI= -golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -235,8 +231,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -253,14 +249,14 @@ golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 h1:GZokNIeuVkl3aZHJchRrr13WCsols02MLUcz1U9is6M= golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -282,8 +278,6 @@ google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZi google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From a2c47c9fa4617c90893c071ac74f7dcdf2ff5606 Mon Sep 17 00:00:00 2001 From: atjhoendz Date: Fri, 10 May 2024 13:50:30 +0700 Subject: [PATCH 2/4] misc: change tapao marshal to json --- event_message.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/event_message.go b/event_message.go index 0c404e5..1f1e9af 100644 --- a/event_message.go +++ b/event_message.go @@ -1,6 +1,7 @@ package ferstream import ( + "encoding/json" "time" "github.com/kumparan/go-utils" @@ -126,13 +127,13 @@ func (n *NatsEventMessage) Build() (data []byte, err error) { return nil, n.Error } - message, err := tapao.Marshal(n, tapao.With(tapao.JSON)) + msgInBytes, err := json.Marshal(n) if err != nil { n.wrapError(err) return nil, n.Error } - return message, nil + return msgInBytes, nil } // WithEvent :nodoc: @@ -210,13 +211,13 @@ func (n *NatsEventMessage) AddSubject(subj string) { // ToJSONString marshal message to JSON string func (n *NatsEventMessage) ToJSONString() (string, error) { - bt, err := tapao.Marshal(n, tapao.With(tapao.JSON)) + bt, err := json.Marshal(n) return string(bt), err } // ToJSONByte marshal message to JSON byte func (n *NatsEventMessage) ToJSONByte() ([]byte, error) { - return tapao.Marshal(n, tapao.With(tapao.JSON)) + return json.Marshal(n) } // Build :nodoc: @@ -225,13 +226,13 @@ func (n *NatsEventAuditLogMessage) Build() (data []byte, err error) { return nil, n.Error } - message, err := tapao.Marshal(n, tapao.With(tapao.JSON)) + msgInBytes, err := json.Marshal(n) if err != nil { n.wrapError(err) return nil, n.Error } - return message, nil + return msgInBytes, nil } // ParseFromBytes :nodoc: @@ -251,13 +252,13 @@ func (n *NatsEventAuditLogMessage) AddSubject(subj string) { // ToJSONString marshal message to JSON string func (n *NatsEventAuditLogMessage) ToJSONString() (string, error) { - bt, err := tapao.Marshal(n, tapao.With(tapao.JSON)) + bt, err := json.Marshal(n) return string(bt), err } // ToJSONByte marshal message to JSON byte func (n *NatsEventAuditLogMessage) ToJSONByte() ([]byte, error) { - return tapao.Marshal(n, tapao.With(tapao.JSON)) + return json.Marshal(n) } func (n *NatsEventAuditLogMessage) wrapError(err error) { From b200c46782f13ebca3f41299d173edab3c1594c8 Mon Sep 17 00:00:00 2001 From: atjhoendz Date: Fri, 10 May 2024 13:55:05 +0700 Subject: [PATCH 3/4] misc: upgrade pipeline go version --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 5873dc7..a932f30 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,7 +12,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.22 - name: Test run: go test -v ./... From a0a948d2851d1072e283f759ff0f4a1a56ee5a71 Mon Sep 17 00:00:00 2001 From: atjhoendz Date: Fri, 10 May 2024 14:08:14 +0700 Subject: [PATCH 4/4] misc: change tapao unmarshal to json --- event_message.go | 10 +++++----- event_message_test.go | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/event_message.go b/event_message.go index 1f1e9af..00df954 100644 --- a/event_message.go +++ b/event_message.go @@ -196,7 +196,7 @@ func (n *NatsEventMessage) wrapError(err error) { // ParseFromBytes :nodoc: func (n *NatsEventMessage) ParseFromBytes(data []byte) (err error) { - err = tapao.Unmarshal(data, &n, tapao.With(tapao.JSON), tapao.FallbackWith(tapao.MessagePack)) + err = json.Unmarshal(data, &n) if err != nil { n.Error = errors.Wrap(n.Error, err.Error()) return err @@ -237,7 +237,7 @@ func (n *NatsEventAuditLogMessage) Build() (data []byte, err error) { // ParseFromBytes :nodoc: func (n *NatsEventAuditLogMessage) ParseFromBytes(data []byte) (err error) { - err = tapao.Unmarshal(data, &n, tapao.With(tapao.JSON)) + err = json.Unmarshal(data, &n) if err != nil { n.Error = errors.Wrap(n.Error, err.Error()) return err @@ -272,20 +272,20 @@ func (n *NatsEventAuditLogMessage) wrapError(err error) { // ParseJSON parse JSON into Nats event message func ParseJSON(in string) (*NatsEventMessage, error) { msg := &NatsEventMessage{} - err := tapao.Unmarshal([]byte(in), msg, tapao.With(tapao.JSON)) + err := json.Unmarshal([]byte(in), msg) return msg, err } // ParseNatsEventMessageFromBytes :nodoc: func ParseNatsEventMessageFromBytes(in []byte) (*NatsEventMessage, error) { msg := &NatsEventMessage{} - err := tapao.Unmarshal(in, msg, tapao.With(tapao.JSON)) + err := json.Unmarshal(in, msg) return msg, err } // ParseNatsEventAuditLogMessageFromBytes :nodoc: func ParseNatsEventAuditLogMessageFromBytes(in []byte) (*NatsEventAuditLogMessage, error) { msg := &NatsEventAuditLogMessage{} - err := tapao.Unmarshal(in, msg, tapao.With(tapao.JSON)) + err := json.Unmarshal(in, msg) return msg, err } diff --git a/event_message_test.go b/event_message_test.go index 16ff4b8..524a353 100644 --- a/event_message_test.go +++ b/event_message_test.go @@ -133,7 +133,7 @@ func TestNatsEventMessage_Build(t *testing.T) { assert.NotNil(t, message) var result NatsEventMessage - err = tapao.Unmarshal(message, &result, tapao.With(tapao.JSON)) + err = json.Unmarshal(message, &result) assert.NoError(t, err) assert.Equal(t, event.ID, result.NatsEvent.ID) assert.Equal(t, event.UserID, result.NatsEvent.UserID) @@ -159,7 +159,7 @@ func TestNatsEventMessage_Build(t *testing.T) { assert.NotNil(t, message) var result NatsEventMessage - err = tapao.Unmarshal(message, &result, tapao.With(tapao.JSON)) + err = json.Unmarshal(message, &result) assert.NoError(t, err) assert.Equal(t, event.ID, result.NatsEvent.ID) assert.Equal(t, event.UserID, result.NatsEvent.UserID) @@ -334,7 +334,7 @@ func TestNatsEventAuditLogMessage_Build(t *testing.T) { assert.NotNil(t, msgByte) var result NatsEventAuditLogMessage - err = tapao.Unmarshal(msgByte, &result, tapao.With(tapao.JSON)) + err = json.Unmarshal(msgByte, &result) assert.NoError(t, err) assert.Equal(t, msg.ServiceName, result.ServiceName) assert.Equal(t, msg.OldData, result.OldData)