在使用Goland开发go项目的时候,突然有一次遇到有些包下面的类无法被引用的情况,排查下来发现是这些包下面的config.go文件无法被正常识别成go代码文件

从而导致下面无法引用其他包中的所有config.go文件中的类
kratos无法正常引用

gorm的gen无法正常引用

解决方法是去File Type下面的File type auto-detected by file content下面将config.go配置删除,就可以解决这个问题

在使用Goland开发go项目的时候,突然有一次遇到有些包下面的类无法被引用的情况,排查下来发现是这些包下面的config.go文件无法被正常识别成go代码文件
从而导致下面无法引用其他包中的所有config.go文件中的类
kratos无法正常引用
gorm的gen无法正常引用
解决方法是去File Type下面的File type auto-detected by file content下面将config.go配置删除,就可以解决这个问题