go testing cannot find main module; see 'go help modules' code example
Example: go testing cannot find main module; see 'go help modules'
After upgrade to go1.16, try to set :
go env -w GO111MODULE=auto
https://blog.golang.org/go116-module-changes
Thx