goland Cannot resolve import 'google/api/annotations.proto'
前言
kratos 项目出现 import 标红,但是 $GOPATH/src/google/api/annotations.proto 已经存在了。

解决
路径:Goland > Settings > Languages & Frameworks > Protocol Buffers
取消勾选 Configure automatically,添加自定义 Protocol Buffers 文件夹

这样 goland,就能加载到 proto 文件了。


浙公网安备 33010602011771号