@@ -26,9 +26,8 @@ var proxy_address string
2626// The path to the temporary file that stores the proxy certificate, if any.
2727var proxy_cert_file string
2828
29- // An array of registry configurations that are relevant to Go.
30- // This excludes other registry configurations that may be available, but are not relevant to Go.
31- var proxy_configs []RegistryConfig
29+ // An array of goproxy server URLs.
30+ var goproxy_servers []string
3231
3332// Stores the environment variables that we wish to pass on to `go` commands.
3433var proxy_vars []string = nil
@@ -97,16 +96,16 @@ func getEnvVars() []string {
9796 // filter others out at this point.
9897 for _ , cfg := range val {
9998 if cfg .Type == GOPROXY_SERVER {
100- proxy_configs = append (proxy_configs , cfg )
99+ goproxy_servers = append (goproxy_servers , cfg . URL )
101100 slog .Info ("Found GOPROXY server" , slog .String ("url" , cfg .URL ))
102101 }
103102 }
104103
105- if len (proxy_configs ) > 0 {
104+ if len (goproxy_servers ) > 0 {
106105 goproxy_val := "https://proxy.golang.org,direct"
107106
108- for _ , cfg := range proxy_configs {
109- goproxy_val = cfg . URL + "," + goproxy_val
107+ for _ , url := range goproxy_servers {
108+ goproxy_val = url + "," + goproxy_val
110109 }
111110
112111 result = append (result , fmt .Sprintf ("GOPROXY=%s" , goproxy_val ), "GOPRIVATE=" , "GONOPROXY=" )
0 commit comments