download: update error messages in ModuleName and LatestVersion

This commit is contained in:
80111+shawnps@users.noreply.github.com
2024-12-03 18:11:25 +09:00
committed by shawnps
parent ff1cdf2bf0
commit 6c8fd82b88

View File

@@ -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