mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-16 19:32:27 +08:00
chore: replace ioutil -> io
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user