“package XXX is not in GOROOT“ when building a Go project2021-09-06

解决方案
stackoverflow

You may have GO111MODULE set “on”, which will be on the go mod. Turning off the GO111MODULE may resolve this problem.
go env -w GO111MODULE=off