Skip to content

Commit bd08a0b

Browse files
committed
chore: remove refs to deprecated io/ioutil
1 parent 360648d commit bd08a0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/server.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"encoding/xml"
88
"errors"
99
"fmt"
10-
"io/ioutil"
10+
"io"
1111
"math/rand"
1212
"net/http"
1313
"reflect"
@@ -268,7 +268,7 @@ func marshal(data interface{}, ctp request.ContentType) ([]byte, error) {
268268

269269
// 处理消息体
270270
func (srv *Server) handleRequest(w http.ResponseWriter, r *http.Request, isEncrpt bool, ctp request.ContentType) (interface{}, error) {
271-
raw, err := ioutil.ReadAll(r.Body)
271+
raw, err := io.ReadAll(r.Body)
272272
if err != nil {
273273
return nil, err
274274
}

0 commit comments

Comments
 (0)