remove deprecated of package io/ioutil (#3395)
This commit is contained in:
@ -7,7 +7,6 @@ package gin
|
||||
import (
|
||||
"errors"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"math"
|
||||
"mime/multipart"
|
||||
@ -753,7 +752,7 @@ func (c *Context) ShouldBindBodyWith(obj any, bb binding.BindingBody) (err error
|
||||
}
|
||||
}
|
||||
if body == nil {
|
||||
body, err = ioutil.ReadAll(c.Request.Body)
|
||||
body, err = io.ReadAll(c.Request.Body)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -872,7 +871,7 @@ func (c *Context) GetHeader(key string) string {
|
||||
|
||||
// GetRawData returns stream data.
|
||||
func (c *Context) GetRawData() ([]byte, error) {
|
||||
return ioutil.ReadAll(c.Request.Body)
|
||||
return io.ReadAll(c.Request.Body)
|
||||
}
|
||||
|
||||
// SetSameSite with cookie
|
||||
|
Reference in New Issue
Block a user