300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > go module使用教程:使用go mod的方法.报错go: cannot determine module path f

go module使用教程:使用go mod的方法.报错go: cannot determine module path f

时间:2022-01-30 10:40:58

相关推荐

go module使用教程:使用go mod的方法.报错go: cannot determine module path f

使用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 src

3.goland中 file->Settings->Go->Go Modules中勾上 Enable Go Modules(vgo) integration

右键src目录,以goland工程打开,报红消失

每天学习一个golang知识点

go module使用教程:使用go mod的方法.报错go: cannot determine module path for source directory E:\tttttt (outside

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。