Skip to content

Commit 2cb649e

Browse files
mmatczukpires
authored andcommitted
chore(protocol_test): remove usage of ioutil
1 parent 9814f02 commit 2cb649e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

protocol_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"errors"
1212
"fmt"
1313
"io"
14-
"io/ioutil"
1514
"net"
1615
"testing"
1716
"time"
@@ -1480,7 +1479,7 @@ type testConn struct {
14801479

14811480
func (c *testConn) ReadFrom(r io.Reader) (int64, error) {
14821481
c.readFromCalledWith = r
1483-
b, err := ioutil.ReadAll(r)
1482+
b, err := io.ReadAll(r)
14841483
return int64(len(b)), err
14851484
}
14861485
func (c *testConn) Write(p []byte) (int, error) {
@@ -1625,7 +1624,7 @@ func benchmarkTCPProxy(size int, b *testing.B) {
16251624

16261625
}()
16271626
//receive data
1628-
n, err := io.Copy(ioutil.Discard, conn)
1627+
n, err := io.Copy(io.Discard, conn)
16291628
if n != int64(len(data)) {
16301629
b.Fatalf("Expected to receive %d bytes, got %d", len(data), n)
16311630
}

0 commit comments

Comments
 (0)