aboutsummaryrefslogtreecommitdiff
path: root/src/net/sendfile_test.go
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2021-03-09 10:38:30 +0100
committerTobias Klauser <tobias.klauser@gmail.com>2021-03-09 10:37:50 +0000
commit034fffdb490ade3cbccd79eacdb9370850ef51d1 (patch)
tree9d1ce45c314b17048d880b7c58b1630a29770f13 /src/net/sendfile_test.go
parent762ef81a5670da99a4b060fd3afe4134c9e82017 (diff)
downloadgo-034fffdb490ade3cbccd79eacdb9370850ef51d1.tar.xz
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 <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com> TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/net/sendfile_test.go')
-rw-r--r--src/net/sendfile_test.go3
1 files changed, 1 insertions, 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)
}