]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/pprof: remove redundant URLs from error messages in fetch.FetchURL
authorIbrahim AshShohail <ibra.sho@gmail.com>
Tue, 24 Jan 2017 19:20:04 +0000 (22:20 +0300)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 1 Feb 2017 21:10:04 +0000 (21:10 +0000)
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>

src/cmd/pprof/internal/fetch/fetch.go

index d3ccb65473b3386d6b2481feec1394a3766611d3..3ed16bb50d34e6bf06154b819442509330d5112d 100644 (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)