remove deprecated of package io/ioutil (#3395)

This commit is contained in:
Qt
2022-11-17 22:35:55 +08:00
committed by GitHub
parent 234a1d33f7
commit 6150c488e7
8 changed files with 27 additions and 31 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ package binding
import (
"errors"
"io/ioutil"
"io"
"net/http"
"google.golang.org/protobuf/proto"
@@ -19,7 +19,7 @@ func (protobufBinding) Name() string {
}
func (b protobufBinding) Bind(req *http.Request, obj any) error {
buf, err := ioutil.ReadAll(req.Body)
buf, err := io.ReadAll(req.Body)
if err != nil {
return err
}