diff --git a/api/api_test.go b/api/api_test.go index dab1169b..846e154e 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -7,7 +7,7 @@ package api import ( "bytes" "encoding/json" - "io/ioutil" + "io" "net/http" "net/http/httptest" "sort" @@ -51,7 +51,7 @@ func (s *RouterAPISuite) TestHealthcheckOK() { s.api.Healthcheck(w, req) resp := w.Result() - body, _ := ioutil.ReadAll(resp.Body) + body, _ := io.ReadAll(resp.Body) s.Equal(http.StatusOK, resp.StatusCode) s.Equal("WORKING", string(body)) diff --git a/cmd/router/main.go b/cmd/router/main.go index fe32c534..393650e7 100644 --- a/cmd/router/main.go +++ b/cmd/router/main.go @@ -6,7 +6,7 @@ package main import ( "flag" - "io/ioutil" + "io" "log" "os" "time" @@ -125,7 +125,7 @@ func main() { return } clustersFile := &backend.ClustersFile{} - data, err := ioutil.ReadAll(f) + data, err := io.ReadAll(f) if err != nil { log.Printf("failed to load clusters file: %v\n", err) return