From f917ce84ddb7743d4e3ee72029bf9386ab0d5b42 Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Sun, 2 Jul 2023 20:04:45 +0200 Subject: [PATCH] Replace call to deprecated ioutil.ReadAll with io.ReadAll Starting from Go 1.16, ioutil.ReadAll simply calls io.ReadAll. --- pkg/form.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/form.go b/pkg/form.go index 0f7883d..44eb801 100644 --- a/pkg/form.go +++ b/pkg/form.go @@ -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 }