chore: replace ioutil -> io

This commit is contained in:
henry.chen
2024-11-04 10:31:28 +08:00
parent 27bc610a31
commit 6e1965a764
8 changed files with 27 additions and 26 deletions

View File

@@ -5,7 +5,7 @@ import (
"bytes"
"encoding/xml"
"fmt"
"io/ioutil"
"io"
"net/http"
"net/url"
@@ -30,7 +30,7 @@ var feedrPingFunc = func(btitle, slug string) error {
return err
}
defer resp.Body.Close()
data, err := ioutil.ReadAll(resp.Body)
data, err := io.ReadAll(resp.Body)
if err != nil {
return err
}
@@ -88,7 +88,7 @@ var rpcPingFunc = func(btitle, slug string) error {
continue
}
defer resp.Body.Close()
data, err := ioutil.ReadAll(resp.Body)
data, err := io.ReadAll(resp.Body)
if err != nil {
logrus.Error("rpcPingFunc.ReadAll: ", err)
continue