From 88d2db669d92864de26610ec5cc4e40f3d7dc552 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Wed, 12 Jul 2023 11:16:32 +0800 Subject: [PATCH] chore: use bytes.Equal instead bytes.Compare --- internal/http2/transport_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/http2/transport_test.go b/internal/http2/transport_test.go index d587c1ae..5acecd3d 100644 --- a/internal/http2/transport_test.go +++ b/internal/http2/transport_test.go @@ -4757,7 +4757,7 @@ func testTransportBodyReadError(t *testing.T, body []byte) { // If the client's done, it // will have reported any // errors on its side. - if bytes.Compare(receivedBody, body) != 0 { + if !bytes.Equal(receivedBody, body) { return fmt.Errorf("body: %q; expected %q", receivedBody, body) } if resetCount != 1 {