Original https://studygolang.com/articles/22277?fr=sidebar
Brief introduction
Go Goproxy China fully implements modules agency agreement. And it is a much trusted by the Chinese cloud service provider seven cattle cloud support non-profit projects. The goal is to provide China and other parts of the world have a Gopher free, reliable, continuous online and through Modules CDN acceleration agent.
Happily bar coding, Gopher had! ;-)
usage
macOS or Linux
Open your terminal and execute:
$ export GOPROXY=https://goproxy.cn
or
$ echo "GOPROXY=https://goproxy.cn" >> ~/.profile && source ~/.profile
carry out.
Windows
Open your PowerShell and execute:
C:\> $env:GOPROXY = "https://goproxy.cn"
or
1. Open the "Start" and search for "env"
2. Select the "Edit System environment variables"
3. Click the "Environment Variables ..." button
4. Under "<your username> User variables" section (upper part)
5. Click the "New ..." button
6. Select the "variable name" input box and enter "GOPROXY"
7. Select "Variable Value" input box and type "https://goproxy.cn"
8. Click the "OK" button