Error message "go: go.mod file not found in current directory or any parent directory; see 'go help modules'"
Full error message
I just updated to the new version of Go - Go version 1.16.2 Linux/amd64 and am getting an error when I build a Hello, World! example: go: go.mod file not found in current directory or any parent directory; see 'go help modules' Even when I follow the fix from this post it isn't working. I set these variables and then build again: GO111MODULE=on GOPROXY=https://proxy.golang.org,direct And the same problem unfortunately.
Solutionsource: stackoverflow \u2197
Yes, just follow the tutorial and for me that was doing go mod init test3 to create a module. No one else has been upgrading from the old version or everyone else just understood it properly I guess.
API access
Get this solution programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/error/ce7aee86e65dfecb1797d2dc875eb1433d76f651eac2cb6f02f27dfdc337e28bhash \u00b7 ce7aee86e65dfecb1797d2dc875eb1433d76f651eac2cb6f02f27dfdc337e28b