【开发工具】解决 Goland 报错:Found several packages [main, xxx] in ...

简介: 【开发工具】解决 Goland 报错:Found several packages [main, xxx] in ...

正文


前两天为了在 Go 语言中使用 oracle 的数据库驱动,安装了个 _ "github.com/godror/godror"包,结果 Goland 就一直报错(红色下划线),作为一个强迫症开发者,是受不了程序里报错的(毕竟程序警告都不想容忍)。报错如下:


12.webp.jpg

报错信息:
Found several packages [main, time] in 'D:/v4_dev_env/go_1_19_2/src/time;D:/v4_dev_env/go_1_19_2/src/time'


其实这是一个 Goland 的版本问题,主要是由于 golang 语言的版本太高了,使用的还是老版本的 Goland,这里更新一下 Goland 就好。

PS:我这里的 goland 版本是 1.19.2;Goland 版本是 2020.3


问题修复:


下载安装 2021.3.5 版本即可恢复。


11.webp.jpg

目录
相关文章
|
6月前
|
编译器 Go 开发工具
JetBrains GoLand 以debug运行Go程序时出现could not launch process: decoding dwarf section info at offset 0x0: too short报错之保姆级别解决方案
JetBrains GoLand 以debug运行Go程序时出现could not launch process: decoding dwarf section info at offset 0x0: too short报错之保姆级别解决方案
62 0
|
7月前
|
Java 编译器 Go
Go 语言 入门 && 基于 GoLand 2023.1 创建第一个Go程序
Go 语言 入门 && 基于 GoLand 2023.1 创建第一个Go程序
62 0
|
6月前
|
IDE Go 开发工具
Go开发IDE全览:GoLand vs VSCode全面解析
Go开发IDE全览:GoLand vs VSCode全面解析
217 0
|
IDE Go 开发工具
【Go·编辑器IDE】GoLand集成开发环境安装及使用教程
【Go·编辑器IDE】GoLand集成开发环境安装及使用教程
【Go·编辑器IDE】GoLand集成开发环境安装及使用教程
|
9月前
|
Linux Go Docker
goland如何把go项目打包进docker镜像
goland如何把go项目打包进docker镜像
328 0
Go-解决低版本Goland调试问题:Version of Delve is too old for this version...
Go-解决低版本Goland调试问题:Version of Delve is too old for this version...
943 0
Go-解决低版本Goland调试问题:Version of Delve is too old for this version...
|
编译器 Go
【七天入门Go语言】Goland && Golang 的安装与配置 | 第一天
【七天入门Go语言】Goland && Golang 的安装与配置 | 第一天
157 0
【七天入门Go语言】Goland && Golang 的安装与配置 | 第一天
|
3月前
|
Go C语言
安装go-sqlite3包时报exec: "gcc": executable file not found in %PATH%解决办法
安装go-sqlite3包时报exec: "gcc": executable file not found in %PATH%解决办法
|
7月前
|
数据可视化 Python
常见的bug---5、在安装superset时候报错,Command “python setup.py egg_info“ failed with error code 1
常见的bug---5、在安装superset时候报错,Command “python setup.py egg_info“ failed with error code 1