1
0
mirror of https://github.com/golang/go synced 2024-11-23 14:40:02 -07:00

net/http: fix nits found by go tool vet

LGTM=ruiu
R=golang-codereviews, ruiu
CC=golang-codereviews
https://golang.org/cl/91480043
This commit is contained in:
Mikio Hara 2014-05-15 12:41:45 -07:00 committed by Brad Fitzpatrick
parent f5184d3437
commit 27b9897496
2 changed files with 2 additions and 2 deletions

View File

@ -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") {

View File

@ -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: