refactor: move from io/ioutil to io and os package (#2592)

This commit is contained in:
kekeimiku
2021-09-29 10:33:57 +08:00
committed by GitHub
parent 72a7fd948e
commit 0cee1877e3
19 changed files with 38 additions and 44 deletions

View File

@@ -3,7 +3,7 @@ package client
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net"
"net/http"
"strconv"
@@ -125,7 +125,7 @@ func (c *Client) do(req *http.Request) (string, error) {
if resp.StatusCode != 200 {
return "", fmt.Errorf("api status code [%d]", resp.StatusCode)
}
buf, err := ioutil.ReadAll(resp.Body)
buf, err := io.ReadAll(resp.Body)
if err != nil {
return "", err
}