Skip to content

Commit

Permalink
Merge pull request #101 from testwill/ioutil
Browse files Browse the repository at this point in the history
chore: remove refs to deprecated io/ioutil
  • Loading branch information
royalrick authored Jul 24, 2023
2 parents 360648d + bd08a0b commit 20189b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"encoding/xml"
"errors"
"fmt"
"io/ioutil"
"io"
"math/rand"
"net/http"
"reflect"
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 20189b1

Please sign in to comment.