1
0
mirror of https://github.com/golang/go synced 2024-11-11 22:20:22 -07:00

cmd/pprof: remove redundant URLs from error messages in fetch.FetchURL

Errors from http.Client already includes the URL in the message.

Fixes #18754

Change-Id: I65fc25a8f3aa6a2d4627aac3fb47eed8d3c4151a
Reviewed-on: https://go-review.googlesource.com/35650
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Ibrahim AshShohail 2017-01-24 22:20:04 +03:00 committed by Brad Fitzpatrick
parent 1ef3a77e18
commit 5b1c6efb31

View File

@ -49,7 +49,7 @@ func Fetcher(source string, timeout time.Duration, ui plugin.UI) (*profile.Profi
func FetchURL(source string, timeout time.Duration) (io.ReadCloser, error) {
resp, err := httpGet(source, timeout)
if err != nil {
return nil, fmt.Errorf("http fetch %s: %v", source, err)
return nil, fmt.Errorf("http fetch: %v", err)
}
if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("server response: %s", resp.Status)