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
To configuration the go proxy, we may required to prepare a environment variable.
This environment variable could be configured in various kind of locations. For example, we may define it in
$HOME/.bash_profile, every time we are using bash, the environment variable could be configured.
However, to avoid polluting the global environment, we may also define it in some special files.
If you are using macOS, we may configure it in
It 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.