go mod init 项目名来创建go.mod 然后go mod tidy 就可以啦
如果之前有go.mod 就删掉再执行
同时import时要项目名/…
不能输相对路径
报错go.mod 文件内unresolved dependency
解决:by enabling the go modules integration. You can do that from Preferences > GO > GO Modules.
goland 项目的import报错问题的解决
于 2022-02-16 00:44:46 首次发布