go: modules disabled inside GOPATH/src by GO111MODULE=auto; see 'go help modules' solution
I’ll introduce how to resolve the error go: modules disabled inside GOPATH/src by GO111MODULE=auto; see ‘go help modules’ that occurs with go mod init.
$ go mod init
go: modules disabled inside GOPATH/src by GO111MODULE=auto; see 'go help modules'
export GO111MODULE=on
go mod init
$ go mod init
go: creating new go.mod: module github.com/your-orgs/your-app
That’s all from the Gemba, where we want to get go mod init working.