脚本宝典收集整理的这篇文章主要介绍了go module使用教程:使用go mod的方法.报错go: cannot determine module path for source directory,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
使用go mod的方法
单独从大工程里拷出小文件想新建新文件工程时,部分文件路径名报红,出现报错go: cannot determine module path for source directory E:tttttt (outside GOPATH, no import comments)1.在src 目录下新建 go.mod文件2. go.mod中第一行加入一行内容 module src3.goland中 file->Settings->Go->Go Modules中勾上 Enable Go Modules(vgo) integration
右键src目录,以goland工程打开,报红消失————————————————版权声明:本文为CSDN博主「小白debug」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。原文链接:https://blog.csdn.net/ilini/article/details/88398744
以上是脚本宝典为你收集整理的go module使用教程:使用go mod的方法.报错go: cannot determine module path for source directory全部内容,希望文章能够帮你解决go module使用教程:使用go mod的方法.报错go: cannot determine module path for source directory所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。