From d4f6f273bc36d8ce376cd7aee794458011fee2e0 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Fri, 26 Apr 2024 15:24:28 +0800 Subject: chore: remove refs to deprecated io/ioutil Signed-off-by: guoguangwu chore: remove refs to deprecated io/ioutil Signed-off-by: guoguangwu --- bridge/github/export.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bridge/github/export.go') diff --git a/bridge/github/export.go b/bridge/github/export.go index 0d340b49..30e064c0 100644 --- a/bridge/github/export.go +++ b/bridge/github/export.go @@ -5,7 +5,7 @@ import ( "context" "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" "os" "strings" @@ -452,7 +452,7 @@ func getRepositoryNodeID(ctx context.Context, token *auth.Token, owner, project NodeID string `json:"node_id"` }{} - data, _ := ioutil.ReadAll(resp.Body) + data, _ := io.ReadAll(resp.Body) err = resp.Body.Close() if err != nil { return "", err @@ -564,7 +564,7 @@ func (ge *githubExporter) createGithubLabel(ctx context.Context, label, color st Color string `json:"color"` }{} - data, _ = ioutil.ReadAll(resp.Body) + data, _ = io.ReadAll(resp.Body) defer resp.Body.Close() err = json.Unmarshal(data, &aux) -- cgit