summaryrefslogtreecommitdiff
path: root/src/net/http/httputil/dump_test.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2020-10-28 09:12:20 -0400
committerCherry Zhang <cherryyz@google.com>2020-10-28 09:12:20 -0400
commita16e30d162c1c7408db7821e7b9513cefa09c6ca (patch)
treeaf752ba9ba44c547df39bb0af9bff79f610ba9d5 /src/net/http/httputil/dump_test.go
parent91e4d2d57bc341dd82c98247117114c851380aef (diff)
parentcf6cfba4d5358404dd890f6025e573a4b2156543 (diff)
downloadgo-git-dev.link.tar.gz
[dev.link] all: merge branch 'master' into dev.linkdev.link
Clean merge. Change-Id: Ia7b2808bc649790198d34c226a61d9e569084dc5
Diffstat (limited to 'src/net/http/httputil/dump_test.go')
-rw-r--r--src/net/http/httputil/dump_test.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/net/http/httputil/dump_test.go b/src/net/http/httputil/dump_test.go
index ead56bc172..7571eb0820 100644
--- a/src/net/http/httputil/dump_test.go
+++ b/src/net/http/httputil/dump_test.go
@@ -9,7 +9,6 @@ import (
"bytes"
"fmt"
"io"
- "io/ioutil"
"net/http"
"net/url"
"runtime"
@@ -268,7 +267,7 @@ func TestDumpRequest(t *testing.T) {
}
switch b := ti.Body.(type) {
case []byte:
- req.Body = ioutil.NopCloser(bytes.NewReader(b))
+ req.Body = io.NopCloser(bytes.NewReader(b))
case func() io.ReadCloser:
req.Body = b()
default:
@@ -363,7 +362,7 @@ var dumpResTests = []struct {
Header: http.Header{
"Foo": []string{"Bar"},
},
- Body: ioutil.NopCloser(strings.NewReader("foo")), // shouldn't be used
+ Body: io.NopCloser(strings.NewReader("foo")), // shouldn't be used
},
body: false, // to verify we see 50, not empty or 3.
want: `HTTP/1.1 200 OK
@@ -379,7 +378,7 @@ Foo: Bar`,
ProtoMajor: 1,
ProtoMinor: 1,
ContentLength: 3,
- Body: ioutil.NopCloser(strings.NewReader("foo")),
+ Body: io.NopCloser(strings.NewReader("foo")),
},
body: true,
want: `HTTP/1.1 200 OK
@@ -396,7 +395,7 @@ foo`,
ProtoMajor: 1,
ProtoMinor: 1,
ContentLength: -1,
- Body: ioutil.NopCloser(strings.NewReader("foo")),
+ Body: io.NopCloser(strings.NewReader("foo")),
TransferEncoding: []string{"chunked"},
},
body: true,