Skip to content

Commit c063e34

Browse files
committed
net/http, net/http/httputil: fix nits found by vet
Change-Id: Idf02428591f61dc58f654fdaf0e3a55f8b8a1060 Reviewed-on: https://go-review.googlesource.com/18350 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 4aedbf5 commit c063e34

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/net/http/httputil/reverseproxy_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ func TestReverseProxy_Post(t *testing.T) {
392392
backend := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
393393
slurp, err := ioutil.ReadAll(r.Body)
394394
if err != nil {
395-
t.Error("Backend body read = %v", err)
395+
t.Errorf("Backend body read = %v", err)
396396
}
397397
if len(slurp) != len(requestBody) {
398398
t.Errorf("Backend read %d request body bytes; want %d", len(slurp), len(requestBody))

src/net/http/serve_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ Try:
10771077
}
10781078
}
10791079
if !ok {
1080-
t.Fatal("Failed to start up after %d tries", maxTries)
1080+
t.Fatalf("Failed to start up after %d tries", maxTries)
10811081
}
10821082
defer ln.Close()
10831083
c, err := tls.Dial("tcp", ln.Addr().String(), &tls.Config{
@@ -2496,7 +2496,7 @@ func TestHijackBeforeRequestBodyRead(t *testing.T) {
24962496
gone := w.(CloseNotifier).CloseNotify()
24972497
slurp, err := ioutil.ReadAll(reqBody)
24982498
if err != nil {
2499-
t.Error("Body read: %v", err)
2499+
t.Errorf("Body read: %v", err)
25002500
return
25012501
}
25022502
if len(slurp) != len(requestBody) {

0 commit comments

Comments
 (0)