From ac62099b73d8eaa37a47d85fe41c924e2cb207eb Mon Sep 17 00:00:00 2001 From: Shikong <919411476@qq.com> Date: Mon, 24 Jul 2023 08:37:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/wails/pkg/sdk/downloader/downloader.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/wails/pkg/sdk/downloader/downloader.go b/app/wails/pkg/sdk/downloader/downloader.go index 286eddb..adbb658 100644 --- a/app/wails/pkg/sdk/downloader/downloader.go +++ b/app/wails/pkg/sdk/downloader/downloader.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "log" "mime" "net/http" @@ -109,7 +108,7 @@ func (d *Downloader) downloadPart(c PartFile, f *os.File) error { _ = Body.Close() }(resp.Body) - bs, err := ioutil.ReadAll(resp.Body) + bs, err := io.ReadAll(resp.Body) if err != nil { return err } @@ -170,7 +169,7 @@ func (d *Downloader) Run() error { if err != nil { return err } - fByte, err = ioutil.ReadAll(tmpFile) + fByte, err = io.ReadAll(tmpFile) } else { tmpFile, err = os.Create(path) }