Hacker News new | ask | show | jobs
by sascha_sl 2540 days ago
The default mode is already `auto`, which checks if you're within GOPATH (if GOPATH is set) and defaults to mod if you're not.
1 comments

don't know this, thanks! I also assume you no longer need set GO111MODULE=on anymore
That depends -- it defaults to "auto" which means that its enabled outside of $GOPATH but disabled inside it. If you're working on a project that makes use of "go mod vendor" and is built from within your $GOPATH (which is true of quite a few free software Go projects) then you'll need it.