chore(all): remove deprecated io/ioutil import

This commit is contained in:
Quentin McGaw
2022-08-24 19:39:55 +00:00
parent 062b6a276c
commit 8dfaebc737
8 changed files with 13 additions and 19 deletions

View File

@@ -2,7 +2,7 @@ package pprof
import (
"context"
"io/ioutil"
"io"
"net/http"
"testing"
"time"
@@ -96,7 +96,7 @@ func Test_Server(t *testing.T) {
assert.Equalf(t, http.StatusOK, httpResult.response.StatusCode,
"unexpected status code for URL %s: %s", httpResult.url, http.StatusText(httpResult.response.StatusCode))
b, err := ioutil.ReadAll(httpResult.response.Body)
b, err := io.ReadAll(httpResult.response.Body)
require.NoErrorf(t, err, "unexpected error for URL %s: %s", httpResult.url, err)
assert.NotEmptyf(t, b, "response body is empty for URL %s", httpResult.url)