有关vscode安装golang常用工具失败的问题

vscode安装了go插件后,进行编辑.go文件,会提示下载一些工具。但是,经常会失败,要使用代理来解决这个问题;


  1. https://developer.aliyun.com/mirror/ 阿里巴巴开源镜像站,有相对应的goproxy镜像;
  2. https://goproxy.io 这个网站也有对应的镜像,按照网站说明做就可以了;

比如在linux环境下,~/.bashrc 配置用户环境变量;

# golang proxy
# 启用 Go Modules 功能
export GO111MODULE=on
# 配置 GOPROXY 环境变量
export GOPROXY=https://goproxy.io
# export GOPROXY=https://mirrors.aliyun.com/goproxy

猜你喜欢

转载自www.cnblogs.com/rookieagle/p/12323042.html