From 8b38a040830109f19550e7329b82ec5caf76b321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 26 Oct 2022 15:23:04 +0200 Subject: Fix linting errors --- download.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'download.go') diff --git a/download.go b/download.go index 130df91..8367f3d 100644 --- a/download.go +++ b/download.go @@ -20,7 +20,6 @@ package schwift import ( "io" - "io/ioutil" ) // DownloadedObject is returned by Object.Download(). It wraps the io.ReadCloser @@ -31,7 +30,7 @@ import ( // // //Do NOT do this! // reader, err := obj.Download(nil).AsReadCloser() -// bytes, err := ioutil.ReadAll(reader) +// bytes, err := io.ReadAll(reader) // err := reader.Close() // str := string(bytes) // @@ -66,12 +65,12 @@ func (o DownloadedObject) AsByteSlice() ([]byte, error) { if o.err != nil { return nil, o.err } - slice, err := ioutil.ReadAll(o.r) + slice, err := io.ReadAll(o.r) closeErr := o.r.Close() if err == nil { err = closeErr } - return slice, closeErr + return slice, err } // AsString collects the contents of this downloaded object into a string. -- cgit v1.2.3