From 034fffdb490ade3cbccd79eacdb9370850ef51d1 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 9 Mar 2021 10:38:30 +0100 Subject: [PATCH] net: use io.Discard in TestSendfileOnWriteTimeoutExceeded Replace ioutil.Discard which is deprecated as of Go 1.16. This was already done in CL 263142 but accidentially re-introduced in CL 285914. Change-Id: Ife0944d416294b1ba7c8f6b602aa68a3b9213c50 Reviewed-on: https://go-review.googlesource.com/c/go/+/299989 Trust: Tobias Klauser Run-TryBot: Tobias Klauser Reviewed-by: Emmanuel Odeke TryBot-Result: Go Bot --- src/net/sendfile_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/net/sendfile_test.go b/src/net/sendfile_test.go index db72daa328..54e51fa0ab 100644 --- a/src/net/sendfile_test.go +++ b/src/net/sendfile_test.go @@ -14,7 +14,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "os" "runtime" "sync" @@ -367,7 +366,7 @@ func TestSendfileOnWriteTimeoutExceeded(t *testing.T) { } defer conn.Close() - n, err := io.Copy(ioutil.Discard, conn) + n, err := io.Copy(io.Discard, conn) if err != nil { t.Fatalf("expected nil error, but got %v", err) }