Skip to content

Commit

Permalink
chore(protocol_test): remove usage of ioutil
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatczuk authored and pires committed Oct 8, 2024
1 parent 9814f02 commit 2cb649e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"net"
"testing"
"time"
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 2cb649e

Please sign in to comment.