4 ms·
> The whole thing is fairly similar to a materialized Python virtual environment. The feeling I got about GOPATH, back when I first encountered it, was not tha
by cesarb 2y ago
> The whole thing is fairly similar to a materialized Python virtual environment.
The feeling I got about GOPATH, back when I first encountered it, was not that it should be used like a Python virtual environment, where you'd have a separate one for each of your projects. What I understood back then was that you were supposed to set up GOPATH only once for your user, in your shell's startup scripts, and all of your projects would have to live within that directory, in the rigid structure the Go tools dictated. The default for GOPATH added later was just to avoid confusing newbies who aren't used to adding environment variables to their shell startup scripts.