aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/dashapi
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2023-02-23 14:28:18 +0100
committerGitHub <noreply@github.com>2023-02-23 14:28:18 +0100
commit4359978ef22a22ddd5a19adf18cbc80cb44244fb (patch)
tree7952da94e27417b39ddf952d9e0bab431dafc4c5 /dashboard/dashapi
parent9e2ebb3c174f1e168bc1fbadd5f02f2e25e314fc (diff)
all: ioutil is deprecated in go1.19 (#3718)
Diffstat (limited to 'dashboard/dashapi')
-rw-r--r--dashboard/dashapi/dashapi.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/dashboard/dashapi/dashapi.go b/dashboard/dashapi/dashapi.go
index d3ee7bae3..be1cd2fd5 100644
--- a/dashboard/dashapi/dashapi.go
+++ b/dashboard/dashapi/dashapi.go
@@ -11,7 +11,6 @@ import (
"encoding/json"
"fmt"
"io"
- "io/ioutil"
"net/http"
"net/mail"
"net/url"
@@ -808,7 +807,7 @@ func (dash *Dashboard) queryImpl(method string, req, reply interface{}) error {
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
- data, _ := ioutil.ReadAll(resp.Body)
+ data, _ := io.ReadAll(resp.Body)
return fmt.Errorf("request failed with %v: %s", resp.Status, data)
}
if reply != nil {