1. 下载golang安装包:https://golang.google.cn/dl/
2. 配置github加速:git config --global url."https://gitclone.com/github.com/".insteadOf https://github.com/
3. 配置被墙的替代路径:git config --global url."https://github.com/golang/".insteadOf https://golang.org/x/
4. 安装vscode提示安装相关插件
5. 插件安装完毕后,清除配置:
git config --global --unset url.https://gitclone.com/github.com/.insteadof
git config --global --unset url.https://github.com/golang/.insteadof
或者设置代理:
go env -w GOPROXY=https://goproxy.cn,direct