Skip to content

Commit

Permalink
download: update error messages in ModuleName and LatestVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnps committed Dec 3, 2024
1 parent ff1cdf2 commit 25c31c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions download/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -92,7 +92,7 @@ func (c *ProxyClient) LatestVersion(path string) (string, error) {

if resp.StatusCode != http.StatusOK {
b, _ := io.ReadAll(resp.Body)

Check failure on line 94 in download/proxy.go

View workflow job for this annotation

GitHub Actions / build

b declared and not used

Check failure on line 94 in download/proxy.go

View workflow job for this annotation

GitHub Actions / build

b declared and not used
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
Expand Down

0 comments on commit 25c31c3

Please sign in to comment.