1
0
mirror of https://github.com/golang/go synced 2024-11-26 11:58:07 -07:00

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>
This commit is contained in:
Tobias Klauser 2021-03-09 10:38:30 +01:00 committed by Tobias Klauser
parent 762ef81a56
commit 034fffdb49

View File

@ -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)
}