代理加速配置详解

PowerShell (Windows)

# 启用 Go Modules 功能
$env:GO111MODULE="on"
# 配置 GOPROXY 环境变量
$env:GOPROXY="https://goproxy.io"
  1. 右键 我的电脑 -> 属性 -> 高级系统设置 -> 环境变量
  2. 在 “[你的用户名]的用户变量” 中点击 ”新建“ 按钮
  3. 在 “变量名” 输入框并新增 “GOPROXY”
  4. 在对应的 “变量值” 输入框中新增 “https://goproxy.io”
  5. 最后点击 “确定” 按钮保存设置

测试

go get  github.com/gin-gonic/gin
go get github.com/astaxie/beego

 参考:

https://ghostwritten.blog.csdn.net/article/details/105844145

https://blog.csdn.net/qq_33867131/article/details/105766062

https://goproxy.io/zh/docs/getting-started.html 

posted on 2021-01-20 21:55  sunylat  阅读(162)  评论(0编辑  收藏  举报