summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikio Hara <mikioh.mikioh@gmail.com>2014-05-15 12:41:45 -0700
committerMikio Hara <mikioh.mikioh@gmail.com>2014-05-15 12:41:45 -0700
commit8e7d85b8cca4f91c32b85f7bce520aaf194f12e7 (patch)
treeff0bdc86e52ccaa10a945bb4a4f1525c7e94840e
parent17e56eaa9da22104930c0185ae5b7daa562bb17d (diff)
downloadgo-8e7d85b8cca4f91c32b85f7bce520aaf194f12e7.tar.gz
net/http: fix nits found by go tool vet
LGTM=ruiu R=golang-codereviews, ruiu CC=golang-codereviews https://codereview.appspot.com/91480043 Committer: Brad Fitzpatrick <bradfitz@golang.org>
-rw-r--r--src/pkg/net/http/serve_test.go2
-rw-r--r--src/pkg/net/http/transport_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/net/http/serve_test.go b/src/pkg/net/http/serve_test.go
index 030fd6e7b..b3850a590 100644
--- a/src/pkg/net/http/serve_test.go
+++ b/src/pkg/net/http/serve_test.go
@@ -2144,7 +2144,7 @@ func TestCodesPreventingContentTypeAndBody(t *testing.T) {
got := ht.rawResponse(req)
wantStatus := fmt.Sprintf("%d %s", code, StatusText(code))
if !strings.Contains(got, wantStatus) {
- t.Errorf("Code %d: Wanted %q Modified for %q: %s", code, req, got)
+ t.Errorf("Code %d: Wanted %q Modified for %q: %s", code, wantStatus, req, got)
} else if strings.Contains(got, "Content-Length") {
t.Errorf("Code %d: Got a Content-Length from %q: %s", code, req, got)
} else if strings.Contains(got, "stuff") {
diff --git a/src/pkg/net/http/transport_test.go b/src/pkg/net/http/transport_test.go
index a69e61720..964ca0fca 100644
--- a/src/pkg/net/http/transport_test.go
+++ b/src/pkg/net/http/transport_test.go
@@ -2081,7 +2081,7 @@ func TestTransportClosesBodyOnError(t *testing.T) {
defer res.Body.Close()
}
if err == nil || !strings.Contains(err.Error(), fakeErr.Error()) {
- t.Fatalf("Do error = %v; want something containing %q", fakeErr.Error())
+ t.Fatalf("Do error = %v; want something containing %q", err, fakeErr.Error())
}
select {
case err := <-readBody: