mirror of
https://github.com/golang/go
synced 2024-11-22 16:04:40 -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:
parent
762ef81a56
commit
034fffdb49
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user