From bd08a0bbb544087fd69113500f28132163de9777 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Fri, 21 Jul 2023 11:03:45 +0800 Subject: [PATCH] chore: remove refs to deprecated io/ioutil --- server/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/server.go b/server/server.go index 4479584..58ae254 100644 --- a/server/server.go +++ b/server/server.go @@ -7,7 +7,7 @@ import ( "encoding/xml" "errors" "fmt" - "io/ioutil" + "io" "math/rand" "net/http" "reflect" @@ -268,7 +268,7 @@ func marshal(data interface{}, ctp request.ContentType) ([]byte, error) { // 处理消息体 func (srv *Server) handleRequest(w http.ResponseWriter, r *http.Request, isEncrpt bool, ctp request.ContentType) (interface{}, error) { - raw, err := ioutil.ReadAll(r.Body) + raw, err := io.ReadAll(r.Body) if err != nil { return nil, err }