3 ms·
agree, newbie to golang, just started with go1.13beta1 which will make go-module preferred to GOPATH/workspace.
by ausjke 7y ago
agree, newbie to golang, just started with go1.13beta1 which will make go-module preferred to GOPATH/workspace.
- sascha_sl 7y agoThe default mode is already `auto`, which checks if you're within GOPATH (if GOPATH is set) and defaults to mod if you're not.
- ausjke 7y agodon't know this, thanks! I also assume you no longer need set GO111MODULE=on anymore
- cyphar 7y agoThat 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.