Go错误:$GOPATH/go.mod exists but should not

问题描述:$GOPATH/go.mod exists but should not

产生原因:开启模块支持后,并不能与$GOPATH共存,所以把项目从$GOPATH中移出即可


具体解决方法如下(针对goland):途中所示的框框里的内容移除即可

 Go错误:$GOPATH/go.mod exists but should not