当引用其他包时出现这种错误,我们可以采用两种方法:
方法一
goland左上角 File 选择 Settings,进入后
GO中GO modules中 关闭enable Go modules integration,点击右下角Apply-OK即可;
方法二:
打开下方 Termanil 通过命令创建go.mod到你需要引用其他包的目录,例:
在目录中能找到go.mod即可 ,查看运行结果:
本作者也是新手,如果有错误欢迎提出,欢迎大家观看
当引用其他包时出现这种错误,我们可以采用两种方法:
方法一
goland左上角 File 选择 Settings,进入后
GO中GO modules中 关闭enable Go modules integration,点击右下角Apply-OK即可;
方法二:
打开下方 Termanil 通过命令创建go.mod到你需要引用其他包的目录,例:
在目录中能找到go.mod即可 ,查看运行结果:
本作者也是新手,如果有错误欢迎提出,欢迎大家观看