replace ioutil in testing of gchat

Signed-off-by: DiptoChakrabarty <diptochuck123@gmail.com>
This commit is contained in:
Dipto Chakrabarty
2021-11-01 15:17:44 +05:30
committed by DiptoChakrabarty
parent 2dacf08c30
commit 0bb3815f73
+2 -2
View File
@@ -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{}