lowercase path in proxy download

This commit is contained in:
Shawn Smith
2021-11-16 13:24:22 +09:00
parent af83df5612
commit 132b06144b

View File

@@ -9,6 +9,7 @@ import (
"os"
"os/exec"
"path/filepath"
"strings"
)
const (
@@ -23,6 +24,7 @@ type moduleVersion struct {
// ProxyDownload downloads a package from proxy.golang.org
func ProxyDownload(path string) (string, error) {
path = strings.ToLower(path)
u := fmt.Sprintf(proxyLatestURL, path)
resp, err := http.Get(u)
if err != nil {