From d13318e927fa042ca7c7d30f13a80af9ab519259 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Wed, 2 Nov 2022 17:16:09 +0100 Subject: [PATCH] replaced ioutil.ReadAll by io.ReadAll --- src/zipfile/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/zipfile/main.go b/src/zipfile/main.go index 1c47765..469a931 100644 --- a/src/zipfile/main.go +++ b/src/zipfile/main.go @@ -3,7 +3,7 @@ package zipfile import ( "archive/zip" "bytes" - "io/ioutil" + "io" "log" "net/http" "time" @@ -27,7 +27,7 @@ func (zipfile *ZipFile) DownloadFile(c *config.Config) (err error) { } defer resp.Body.Close() - zipfile.Content, err = ioutil.ReadAll(resp.Body) + zipfile.Content, err = io.ReadAll(resp.Body) if err != nil { return } @@ -50,7 +50,7 @@ func (zipfile *ZipFile) ExtractZip(c *config.Config, xmlfile *xmlfile.XMLFile) ( if err != nil { return err } - xmlfile.Content, err = ioutil.ReadAll(rc) + xmlfile.Content, err = io.ReadAll(rc) rc.Close() } else { log.Fatal("File not found")