From 5b1c6efb314f1426c22a7ba9c5983f41b28e76a7 Mon Sep 17 00:00:00 2001 From: Ibrahim AshShohail Date: Tue, 24 Jan 2017 22:20:04 +0300 Subject: [PATCH] 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 Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/cmd/pprof/internal/fetch/fetch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/pprof/internal/fetch/fetch.go b/src/cmd/pprof/internal/fetch/fetch.go index d3ccb65473..3ed16bb50d 100644 --- a/src/cmd/pprof/internal/fetch/fetch.go +++ b/src/cmd/pprof/internal/fetch/fetch.go @@ -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) -- 2.50.0