To speed up our dependencies updating for golang, or prepare some patterns for our special libraries, we probably consider to use a proxy to speed it up.
There are a lot of solutions to play the role as the go proxy server. For example, I am using
[github_widget repo="goproxyio/goproxy" ]
[github_widget repo="goproxy/goproxy.cn" ]
To configuration the go proxy, we may required to prepare a environment variable.
export GOPROXY=http://your-proxy-server:port,directThis environment variable could be configured in various kind of locations. For example, we may define it in HOME/Library/Application Support/go/env
GOPROXY=https://goproxy.io,directIt may not found in the output of printenv, but would got applied in go building system.
The above 2 proxies are only work for public repositories. I had prepared some code, making some authorization, and allow repos able to visit private repo. It did highly reduce the work to divide the projects.
Comments
No comments yet — be the first to write one.