go mod初始化GOPROXY用哪个
在使用go mod初始化时,可以使用以下命令设置GOPROXY:
go env -w GOPROXY=https://goproxy.cn,direct
这将设置GOPROXY为https://goproxy.cn,同时使用direct指示直接访问原始模块源。
GOPROXY是一个环境变量,用于指定模块代理的地址。常见的模块代理有https://goproxy.cn、https://proxy.golang.org等。可以根据自己的需求选择适合的模块代理。
原文地址: https://www.cveoy.top/t/topic/i0tC 著作权归作者所有。请勿转载和采集!