99 "encoding/json"
1010 "errors"
1111 "fmt"
12- "io/ioutil "
12+ "io"
1313 "log"
1414 "math/rand"
1515 "mime/multipart"
@@ -40,7 +40,7 @@ var app = New(
4040 WithDefaultParams (testDefaultParams ),
4141 WithMaxBodySize (maxBodySize ),
4242 WithMaxDuration (maxDuration ),
43- WithObserver (StdLogObserver (log .New (ioutil .Discard , "" , 0 ))),
43+ WithObserver (StdLogObserver (log .New (io .Discard , "" , 0 ))),
4444)
4545
4646var handler = app .Handler ()
@@ -1489,7 +1489,7 @@ func TestGzip(t *testing.T) {
14891489 t .Fatalf ("error creating gzip reader: %s" , err )
14901490 }
14911491
1492- unzippedBody , err := ioutil .ReadAll (gzipReader )
1492+ unzippedBody , err := io .ReadAll (gzipReader )
14931493 if err != nil {
14941494 t .Fatalf ("error reading gzipped body: %s" , err )
14951495 }
@@ -1533,7 +1533,7 @@ func TestDeflate(t *testing.T) {
15331533 if err != nil {
15341534 t .Fatal (err )
15351535 }
1536- body , err := ioutil .ReadAll (reader )
1536+ body , err := io .ReadAll (reader )
15371537 if err != nil {
15381538 t .Fatal (err )
15391539 }
@@ -1805,7 +1805,7 @@ func TestDrip(t *testing.T) {
18051805 }
18061806 defer resp .Body .Close ()
18071807
1808- body , _ := ioutil .ReadAll (resp .Body )
1808+ body , _ := io .ReadAll (resp .Body )
18091809 if err != nil {
18101810 t .Fatalf ("error reading response body: %s" , err )
18111811 }
@@ -1829,7 +1829,7 @@ func TestDrip(t *testing.T) {
18291829 }
18301830
18311831 // in this case, the timeout happens while trying to read the body
1832- body , err := ioutil .ReadAll (resp .Body )
1832+ body , err := io .ReadAll (resp .Body )
18331833 if err == nil {
18341834 t .Fatal ("expected timeout reading body" )
18351835 }
@@ -1892,7 +1892,7 @@ func TestDrip(t *testing.T) {
18921892 }
18931893 defer resp .Body .Close ()
18941894
1895- body , err := ioutil .ReadAll (resp .Body )
1895+ body , err := io .ReadAll (resp .Body )
18961896 if err != nil {
18971897 t .Fatalf ("error reading response body: %s" , err )
18981898 }
0 commit comments