From 25c31c33b4a488621c0ab0383d84f5635f242ecc Mon Sep 17 00:00:00 2001 From: "80111+shawnps@users.noreply.github.com" <80111+shawnps@users.noreply.github.com> Date: Tue, 3 Dec 2024 18:11:25 +0900 Subject: [PATCH] download: update error messages in ModuleName and LatestVersion --- download/proxy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download/proxy.go b/download/proxy.go index 7eda5c9d..ca7609b6 100644 --- a/download/proxy.go +++ b/download/proxy.go @@ -63,7 +63,7 @@ func (c *ProxyClient) ModuleName(path string) (string, error) { } if resp.StatusCode != http.StatusOK { - return "", fmt.Errorf("could not get module name from %s: %s", u, string(b)) + return "", fmt.Errorf("could not get module name from %s", u) } sp := strings.Split(string(b), "\n") @@ -92,7 +92,7 @@ func (c *ProxyClient) LatestVersion(path string) (string, error) { if resp.StatusCode != http.StatusOK { b, _ := io.ReadAll(resp.Body) - return "", fmt.Errorf("could not get latest module version from %s: %s", u, string(b)) + return "", fmt.Errorf("could not get latest module version from %s", u) } var mv moduleVersion