golang开启mod后import报红解决

golang项目开启mod模式并安装依赖完成后,import导入代码仍然飘红

原因是索引路径问题,此时当前项目的依赖路径,可以看到External Libraries只有Go SDK,并没有Go Modules

解决:File -> Settings -> Languages & Frameworks -> Go -> Go Modules -> 勾选 Enable Go Modules (vgo) integration

上一篇 The selected directory is not a valid home for Go SDK
下一篇 Android 7.0及以上FileProvider巨坑Failed to find configured root that contains
目录
文章列表
1 Spring Boot 2.x 整合ActiveMQ时版本引起的问题
Spring Boot 2.x 整合ActiveMQ时版本引起的问题
2
jQuery表单的取值与赋值
jQuery表单的取值与赋值
3
CentOS下源码安装OpenSSL
CentOS下源码安装OpenSSL
4
设计模式(6)抽象工厂模式
设计模式(6)抽象工厂模式
5
sql中left join,right join,inner join,full join之间的区别
sql中left join,right join,inner join,full join之间的区别
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。