File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 55## Go模块的使用
66
77> 1、Go1.11及以后版本才能使用。
8- 2、Go1.11需要设置环境变量 GO111MODULE 为 on(新特性开关,按照Go语言惯例,mod首次在go1.11版本中使用,go1.13及以后版本这个设置可能不会用了 )。
8+ 2、Go1.11需要设置环境变量 GO111MODULE 为 on(新特性开关,按照Go语言惯例,mod首次在go1.11版本中使用,go1.13及以后版本这个设置可以不用了 )。
993、可以设置模块代理:设置环境变量 GOPROXY 的值为代理网址,目前可用的模块公共代理网址有:
10- < https://mirrors.aliyun.com/goproxy/ >
1110< https://goproxy.io >
12- < https://athens.azurefd.net >
1311< https://goproxy.cn >
12+ < https://mirrors.aliyun.com/goproxy/ >
13+ < https://mirrors.cloud.tencent.com/go/ >
14+ < https://athens.azurefd.net >
1415< https://gocenter.io >
1516(注:Go语言官方已推出官方模块代理 < https://proxy.golang.org > 但目前国内处于被墙状态。)
16- 或者使用 :
17+ 或者自建模块代理工具 :
1718< https://github.com/goproxyio/goproxy >
19+ < https://github.com/goproxy/goproxy >
1820< https://github.com/gomods/athens >
19- 自建模块代理。
2021
2122mod是模块英文modules的简写。
2223
You can’t perform that action at this time.
0 commit comments