From 3478fd5276fb2a7810f0ae659a992cfd10796953 Mon Sep 17 00:00:00 2001 From: Ferran Rodenas Date: Wed, 22 Feb 2023 10:45:23 -0800 Subject: [PATCH] Fix deprecated ioutil Signed-off-by: Ferran Rodenas --- .github/workflows/release.yml | 1 + sdk/client_utils.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d8b4901a..98d43097 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,6 +24,7 @@ jobs: with: version: v1.51.2 args: --issues-exit-code=1 + only-new-issues: true - name: Import GPG key id: import_gpg diff --git a/sdk/client_utils.go b/sdk/client_utils.go index f783b806..7c5fd34c 100644 --- a/sdk/client_utils.go +++ b/sdk/client_utils.go @@ -3,7 +3,7 @@ package sdk import ( "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" "net/url" @@ -107,7 +107,7 @@ func FromAPIRequestToHTTPRequest(apiReq *APIRequest) (*http.Request, error) { // FromHTTPRespToAPIResp converts Http response to API response func FromHTTPRespToAPIResp(resp *http.Response) (*APIResponse, error) { - respBody, err := ioutil.ReadAll(resp.Body) + respBody, err := io.ReadAll(resp.Body) if err != nil { return nil, err }