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:
jordi fita mas 2023-07-02 20:04:45 +02:00
parent eb845edf0a
commit f917ce84dd
1 changed files with 2 additions and 2 deletions

View File

@ -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
}