From 2cb649e22ec7e8accaee6459f38e872843aff2ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Matczuk?= Date: Wed, 18 Sep 2024 11:54:56 +0200 Subject: [PATCH] chore(protocol_test): remove usage of ioutil --- protocol_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/protocol_test.go b/protocol_test.go index fd976d1..847601f 100644 --- a/protocol_test.go +++ b/protocol_test.go @@ -11,7 +11,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "net" "testing" "time" @@ -1480,7 +1479,7 @@ type testConn struct { func (c *testConn) ReadFrom(r io.Reader) (int64, error) { c.readFromCalledWith = r - b, err := ioutil.ReadAll(r) + b, err := io.ReadAll(r) return int64(len(b)), err } func (c *testConn) Write(p []byte) (int, error) { @@ -1625,7 +1624,7 @@ func benchmarkTCPProxy(size int, b *testing.B) { }() //receive data - n, err := io.Copy(ioutil.Discard, conn) + n, err := io.Copy(io.Discard, conn) if n != int64(len(data)) { b.Fatalf("Expected to receive %d bytes, got %d", len(data), n) }