Commit 853f1a1a authored by Emmanuel Odeke's avatar Emmanuel Odeke Committed by Brad Fitzpatrick

net/http: fixed trivial go vet warnings

Updates #15177

Change-Id: I748f025461f313b5b426821ead695f90d3011a6b
Reviewed-on: https://go-review.googlesource.com/21677Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 68ac1f77
......@@ -311,7 +311,7 @@ func TestClientRedirectContext(t *testing.T) {
_, err := c.Do(req)
ue, ok := err.(*url.Error)
if !ok {
t.Fatalf("got error %T; want *url.Error")
t.Fatalf("got error %T; want *url.Error", err)
}
if ue.Err != ExportErrRequestCanceled && ue.Err != ExportErrRequestCanceledConn {
t.Errorf("url.Error.Err = %v; want errRequestCanceled or errRequestCanceledConn", ue.Err)
......
......@@ -155,10 +155,10 @@ func TestNewRequest(t *testing.T) {
got := NewRequest(tt.method, tt.uri, tt.body)
slurp, err := ioutil.ReadAll(got.Body)
if err != nil {
t.Errorf("%i. ReadAll: %v", i, err)
t.Errorf("%d. ReadAll: %v", i, err)
}
if string(slurp) != tt.wantBody {
t.Errorf("%i. Body = %q; want %q", i, slurp, tt.wantBody)
t.Errorf("%d. Body = %q; want %q", i, slurp, tt.wantBody)
}
got.Body = nil // before DeepEqual
if !reflect.DeepEqual(got.URL, tt.want.URL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment