zeromicro / go-zero

A cloud-native Go microservices framework with cli tool for productivity.
https://go-zero.dev
MIT License
29.43k stars 3.97k forks source link

*.pb.go的引用报错 #1014

Closed wowfingerlicker closed 3 years ago

wowfingerlicker commented 3 years ago

使用goctl rpc proto -src xxx.proto -dir .生成的xxx.pb.go的package __,导致logic等目录下的引用找不到package.

gozero version: 1.1.10

kesonan commented 3 years ago

使用goctl rpc proto -src xxx.proto -dir .生成的xxx.pb.go的package __,导致logic等目录下的引用找不到package.

gozero version: 1.1.10

这个是由于本机安装的protoc-gen-go是最新版本的问题,目前的解决方案是在proto文件中显示声明go_package,后面我从代码生成层面解决一下,到时候可以关注一下此issue状态

wanderBee commented 3 years ago

hi, i also encountered this problem in the latest version (1.2.1)