Hacker News new | ask | show | jobs
by ausjke 2540 days ago
agree, newbie to golang, just started with go1.13beta1 which will make go-module preferred to GOPATH/workspace.
1 comments

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.
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.