aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/http/requestwrite_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-11-01 22:04:37 -0400
committerRuss Cox <rsc@golang.org>2011-11-01 22:04:37 -0400
commitc2049d2dfeeea3d41fafa91e3e3f0e47c285355b (patch)
tree090fd29206a707cf5a1f63eacaa414203d2b1ccb /src/pkg/http/requestwrite_test.go
parent68050ac76b94b58d962cf8265a8d4eb31ff35658 (diff)
downloadgo-c2049d2dfeeea3d41fafa91e3e3f0e47c285355b.tar.xz
src/pkg/[a-m]*: gofix -r error -force=error
R=golang-dev, iant CC=golang-dev https://golang.org/cl/5322051
Diffstat (limited to 'src/pkg/http/requestwrite_test.go')
-rw-r--r--src/pkg/http/requestwrite_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pkg/http/requestwrite_test.go b/src/pkg/http/requestwrite_test.go
index 194f6dd213..16593e987a 100644
--- a/src/pkg/http/requestwrite_test.go
+++ b/src/pkg/http/requestwrite_test.go
@@ -6,10 +6,10 @@ package http
import (
"bytes"
+ "errors"
"fmt"
"io"
"io/ioutil"
- "os"
"strings"
"testing"
"url"
@@ -24,7 +24,7 @@ type reqWriteTest struct {
WantProxy string // Request.WriteProxy
WantDump string // DumpRequest
- WantError os.Error // wanted error from Request.Write
+ WantError error // wanted error from Request.Write
}
var reqWriteTests = []reqWriteTest{
@@ -292,7 +292,7 @@ var reqWriteTests = []reqWriteTest{
ContentLength: 10, // but we're going to send only 5 bytes
},
Body: []byte("12345"),
- WantError: os.NewError("http: Request.ContentLength=10 with Body length 5"),
+ WantError: errors.New("http: Request.ContentLength=10 with Body length 5"),
},
// Request with a ContentLength of 4 but an 8 byte body.
@@ -306,7 +306,7 @@ var reqWriteTests = []reqWriteTest{
ContentLength: 4, // but we're going to try to send 8 bytes
},
Body: []byte("12345678"),
- WantError: os.NewError("http: Request.ContentLength=4 with Body length 8"),
+ WantError: errors.New("http: Request.ContentLength=4 with Body length 8"),
},
// Request with a 5 ContentLength and nil body.
@@ -319,7 +319,7 @@ var reqWriteTests = []reqWriteTest{
ProtoMinor: 1,
ContentLength: 5, // but we'll omit the body
},
- WantError: os.NewError("http: Request.ContentLength=5 with nil Body"),
+ WantError: errors.New("http: Request.ContentLength=5 with nil Body"),
},
// Verify that DumpRequest preserves the HTTP version number, doesn't add a Host,
@@ -422,7 +422,7 @@ type closeChecker struct {
closed bool
}
-func (rc *closeChecker) Close() os.Error {
+func (rc *closeChecker) Close() error {
rc.closed = true
return nil
}