mirror of
https://github.com/gojp/goreportcard.git
synced 2026-01-28 22:39:05 +08:00
download: update error messages in ModuleName and LatestVersion
This commit is contained in:
committed by
shawnps
parent
ff1cdf2bf0
commit
6c8fd82b88
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user