diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-04-26 09:55:32 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-04-26 09:55:32 +0200 |
| commit | 7b15ed9ef455b6b66c6b376898a88aef5d6a9970 (patch) | |
| tree | 3ef530baa80cdf29436ba981f5783be6b4d2202b /src/pkg/http/requestwrite_test.go | |
| parent | 50104cc32a498f7517a51c8dc93106c51c7a54b4 (diff) | |
| download | golang-7b15ed9ef455b6b66c6b376898a88aef5d6a9970.tar.gz | |
Imported Upstream version 2011.04.13upstream/2011.04.13
Diffstat (limited to 'src/pkg/http/requestwrite_test.go')
| -rw-r--r-- | src/pkg/http/requestwrite_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pkg/http/requestwrite_test.go b/src/pkg/http/requestwrite_test.go index 03a766efd..726baa266 100644 --- a/src/pkg/http/requestwrite_test.go +++ b/src/pkg/http/requestwrite_test.go @@ -6,6 +6,7 @@ package http import ( "bytes" + "io/ioutil" "testing" ) @@ -158,7 +159,7 @@ func TestRequestWrite(t *testing.T) { for i := range reqWriteTests { tt := &reqWriteTests[i] if tt.Body != nil { - tt.Req.Body = nopCloser{bytes.NewBuffer(tt.Body)} + tt.Req.Body = ioutil.NopCloser(bytes.NewBuffer(tt.Body)) } var braw bytes.Buffer err := tt.Req.Write(&braw) @@ -173,7 +174,7 @@ func TestRequestWrite(t *testing.T) { } if tt.Body != nil { - tt.Req.Body = nopCloser{bytes.NewBuffer(tt.Body)} + tt.Req.Body = ioutil.NopCloser(bytes.NewBuffer(tt.Body)) } var praw bytes.Buffer err = tt.Req.WriteProxy(&praw) |
