refactor: stop using deprecated io/ioutil

This commit is contained in:
Aayush
2023-03-29 15:40:49 -04:00
parent 36913db0cd
commit 66fc6dc3e5
64 changed files with 161 additions and 215 deletions
+1 -2
View File
@@ -4,7 +4,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"path"
@@ -65,7 +64,7 @@ func ClientExportStream(apiAddr string, apiAuth http.Header, eref api.ExportRef,
}
if resp.StatusCode != http.StatusOK {
em, err := ioutil.ReadAll(resp.Body)
em, err := io.ReadAll(resp.Body)
if err != nil {
return nil, xerrors.Errorf("reading error body: %w", err)
}