Home >Backend Development >Golang >Why Am I Getting 'go: go.mod file not found...' Error in Go 1.16.2?
One developer updated to Go version 1.16.2, Linux/amd64 and received the error in the title. This error occurred when building a "Hello, World!" example.
The developer attempted to resolve the issue by setting GO111MODULE to on, and using a proxy, however, the issue persisted.
The solution to this problem is to set GO111MODULE to off, using this command:
go env -w GO111MODULE=off
The above is the detailed content of Why Am I Getting 'go: go.mod file not found...' Error in Go 1.16.2?. For more information, please follow other related articles on the PHP Chinese website!