How to set mirrors for Golang (only necessary if you live in China, they have GFW that almost bans everything from outside
Add the following at the end of ~/.bashrc
:
export GO111MODULE=on
export GOPROXY=https://mirrors.aliyun.com/goproxy/
Then open a new terminal, run your golang code again.