diff options
Diffstat (limited to 'src/pkg/http/client_test.go')
-rw-r--r-- | src/pkg/http/client_test.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/pkg/http/client_test.go b/src/pkg/http/client_test.go index ca4235879..919e556e4 100644 --- a/src/pkg/http/client_test.go +++ b/src/pkg/http/client_test.go @@ -27,10 +27,7 @@ func TestClient(t *testing.T) { if err != nil { t.Errorf("Error fetching URL: %v", err); - } else { - s := string(b); - if (!strings.HasPrefix(s, "User-agent:")) { - t.Errorf("Incorrect page body (did not begin with User-agent): %q", s); - } + } else if s := string(b); !strings.HasPrefix(s, "User-agent:") { + t.Errorf("Incorrect page body (did not begin with User-agent): %q", s); } } |