🔥 drop ioutil

This commit is contained in:
源文雨
2022-03-11 11:32:13 +08:00
parent 81d6a06dbe
commit edd9feb8f8
16 changed files with 95 additions and 253 deletions

View File

@@ -4,7 +4,7 @@ package github
import (
"errors"
"fmt"
"io/ioutil"
"io"
"net/http"
"net/url"
"strings"
@@ -119,7 +119,7 @@ func netGet(dest string, header http.Header) ([]byte, error) {
return nil, err
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}