How to fix "go get: warning: modules disabled by GO111MODULE=auto in GOPATH/src"
type following on command line or powershell:
go env -w GO111MODULE=on
should solve your problem
Also got this error when trying to work with vgo
Removing GOROOT (you don't need to explicitly set GOROOT
, Modern versions of Go can figure it out on their own based on the location of the go binary that you run), updating my GOPATH and export GO111MODULE="on"
resolved the issue.
GOPATH see in here
GOPATH may be set to a colon-separated list of paths inside which Go code, package objects, and executables may be found.
Set a GOPATH to use goinstall to build and install your own code and external libraries outside of the Go tree (and to avoid writing Makefiles).
I ran this command
export GO111MODULE="on"
and that worked for me...