mirror of
https://github.com/gojp/goreportcard.git
synced 2026-01-28 22:39:05 +08:00
lowercase path in proxy download
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -23,6 +24,7 @@ type moduleVersion struct {
|
|||||||
|
|
||||||
// ProxyDownload downloads a package from proxy.golang.org
|
// ProxyDownload downloads a package from proxy.golang.org
|
||||||
func ProxyDownload(path string) (string, error) {
|
func ProxyDownload(path string) (string, error) {
|
||||||
|
path = strings.ToLower(path)
|
||||||
u := fmt.Sprintf(proxyLatestURL, path)
|
u := fmt.Sprintf(proxyLatestURL, path)
|
||||||
resp, err := http.Get(u)
|
resp, err := http.Get(u)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user