Skip to content

Commit 2fd0155

Browse files
committed
use ioutil.Discard for go1.13 compatibility
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent ef6121f commit 2fd0155

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

spdy/read.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"compress/zlib"
99
"encoding/binary"
1010
"io"
11+
"io/ioutil"
1112
"net/http"
1213
"strings"
1314
)
@@ -174,7 +175,7 @@ func (f *Framer) parseControlFrame(version uint16, frameType ControlFrameType) (
174175
flags := ControlFlags((length & 0xff000000) >> 24)
175176
length &= 0xffffff
176177
if length > maxControlFramePayload {
177-
if _, err := io.CopyN(io.Discard, f.r, int64(length)); err != nil {
178+
if _, err := io.CopyN(ioutil.Discard, f.r, int64(length)); err != nil {
178179
return nil, err
179180
}
180181
return nil, &Error{InvalidControlFrame, 0}

0 commit comments

Comments
 (0)