mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00: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
1 changed files with 1 additions and 2 deletions
|
|
@ -14,7 +14,6 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
@ -367,7 +366,7 @@ func TestSendfileOnWriteTimeoutExceeded(t *testing.T) {
|
||||||
}
|
}
|
||||||
defer conn.Close()
|
defer conn.Close()
|
||||||
|
|
||||||
n, err := io.Copy(ioutil.Discard, conn)
|
n, err := io.Copy(io.Discard, conn)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("expected nil error, but got %v", err)
|
t.Fatalf("expected nil error, but got %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue