What is GOPROXY?

Tomoharu Tsutsumi
1 min readApr 21, 2024

--

I joined a new Go project. While building the local environment, I face this error message.

goproxy list is not the empty string, but contains no entries

In the first place, I didn’t know what the goproxy is.

What is GOPROXY?

Go installs modules from libraries, but they are subject to version changes. Therefore, it would be hard for us to avoid related bugs. Goproxy solves such problems. Goproxy gets in between modules and our projects and create cache. Our projects’ request to the modules are redirected to the cache, so projects can always refer to the same code.

How to use it

The way to use it is easy, All you have to do is just set up an environment variable like below.

export GOPROXY=https://proxy.golang.org

I could solve the error above by setting up the variable.

Feel free to reach out to me on LinkedIn, which you can find below. Looking forward to connecting!

https://www.linkedin.com/in/tomoharu-tsutsumi-56051a126/

--

--

Tomoharu Tsutsumi

Senior Software Engineer at two industry-leading startups ( Go | Ruby | TypeScript | JavaScript | Gin | Echo | Rails | React | Redux | Next)