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 文件了。

posted @ 2023-06-30 07:14  牛奔  阅读(314)  评论(0编辑  收藏  举报