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报错问题的解决的全部内容,更多相关goland内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复