Skip to content

Commit

Permalink
chore: remove refs to deprecated io/ioutil
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
  • Loading branch information
testwill authored and hdonnay committed Jul 5, 2023
1 parent 32c9ae2 commit a02a0f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions httptransport/discoveryhandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"context"
"encoding/json"
"io/ioutil"
"io"
"net/http"
"net/http/httptest"
"os"
Expand Down Expand Up @@ -35,7 +35,7 @@ func TestDiscoveryEndpoint(t *testing.T) {
t.Errorf("got: %q, want: %q", got, want)
}

buf, err := ioutil.ReadAll(resp.Body)
buf, err := io.ReadAll(resp.Body)
if err != nil {
t.Fatalf("failed to ready response body: %v", err)
}
Expand Down
4 changes: 2 additions & 2 deletions httptransport/matcher_v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package httptransport
import (
"context"
"fmt"
"io/ioutil"
"io"
"net"
"net/http"
"net/http/httptest"
Expand Down Expand Up @@ -80,7 +80,7 @@ func testUpdateDiffMatcher(t *testing.T) {
defer resp.Body.Close()
got, want := resp.StatusCode, http.StatusOK
if got != want {
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
t.Log("could not read body of unexpected response")
}
Expand Down

0 comments on commit a02a0f2

Please sign in to comment.