diff options
| author | Igor Dolzhikov <bluesriverz@gmail.com> | 2015-04-05 22:32:52 +0600 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2015-04-06 15:40:34 +0000 |
| commit | debe12cfcf9e0672bce0972cc22ff093f215ac59 (patch) | |
| tree | faa29530cbe5a8c180a89f966dbd0f8197af851f /src/net/http/client.go | |
| parent | c264c87335ff4b3111d43f830dbe37eac1509f2e (diff) | |
| download | go-debe12cfcf9e0672bce0972cc22ff093f215ac59.tar.xz | |
net/http, math/big, cmd/internal/gc/big: replaced errors.New(fmt.Sprintf(...)) in favour fmt.Errorf()
Change-Id: I38fc0ab84a374cb9be0234e40665d7cea0e76fc1
Reviewed-on: https://go-review.googlesource.com/8402
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/net/http/client.go')
| -rw-r--r-- | src/net/http/client.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/http/client.go b/src/net/http/client.go index 7341871036..88d444eca2 100644 --- a/src/net/http/client.go +++ b/src/net/http/client.go @@ -390,7 +390,7 @@ func (c *Client) doFollowingRedirects(ireq *Request, shouldRedirect func(int) bo } resp.Body.Close() if urlStr = resp.Header.Get("Location"); urlStr == "" { - err = errors.New(fmt.Sprintf("%d response missing Location header", resp.StatusCode)) + err = fmt.Errorf("%d response missing Location header", resp.StatusCode) break } base = req.URL |
