From 0bb3815f73a6a5ef4143ef8015e089d411edaa30 Mon Sep 17 00:00:00 2001 From: Dipto Chakrabarty <45638240+DiptoChakrabarty@users.noreply.github.com> Date: Mon, 1 Nov 2021 15:09:35 +0530 Subject: [PATCH] replace ioutil in testing of gchat Signed-off-by: DiptoChakrabarty --- pkg/notifier/gchat_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/notifier/gchat_test.go b/pkg/notifier/gchat_test.go index 9037fefa4..deb8c7148 100644 --- a/pkg/notifier/gchat_test.go +++ b/pkg/notifier/gchat_test.go @@ -18,7 +18,7 @@ package notifier import ( "encoding/json" - "io/ioutil" + "io" "net/http" "net/http/httptest" "testing" @@ -34,7 +34,7 @@ func TestGChat_Post(t *testing.T) { } ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - b, err := ioutil.ReadAll(r.Body) + b, err := io.ReadAll(r.Body) require.NoError(t, err) var payload = GChatPayload{}