Replace call to deprecated ioutil.ReadAll with io.ReadAll
Starting from Go 1.16, ioutil.ReadAll simply calls io.ReadAll.
This commit is contained in:
parent
eb845edf0a
commit
f917ce84dd
|
@ -8,7 +8,7 @@ import (
|
|||
"fmt"
|
||||
"github.com/jackc/pgtype"
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/mail"
|
||||
"net/url"
|
||||
|
@ -337,7 +337,7 @@ func (field *FileField) FillValue(r *http.Request) error {
|
|||
return err
|
||||
}
|
||||
defer file.Close()
|
||||
field.Content, err = ioutil.ReadAll(file)
|
||||
field.Content, err = io.ReadAll(file)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue