change: replace ioutil.ReadAll with io.ReadAll

This commit is contained in:
lilong.129
2023-08-29 17:27:54 +08:00
parent 97430bf451
commit b64fe9cfdd
6 changed files with 10 additions and 12 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"math/rand"
"net/http"
"net/url"
@@ -176,7 +176,7 @@ func (g *GA4Client) SendEvent(event Event) error {
return nil
}
bs, err = ioutil.ReadAll(res.Body)
bs, err = io.ReadAll(res.Body)
if err != nil {
return errors.Wrap(err, "read GA4 response body failed")
}