错误提示如下:
google/protobuf/descriptor.proto: File not found.
kratos/api/annotations.proto:9:1: Import "google/protobuf/descriptor.proto" was not found or had errors.
kratos/api/annotations.proto:11:8: "google.protobuf.EnumOptions" is not defined.
helloworld.proto:5:1: Import "kratos/api/annotations.proto" was not found or had errors.
exit status 1
wire: helloworld/cmd/helloworld: wrote C:\Users\dkzhang\go\src\github.com\dkzhang\helloworld\cmd\helloworld\wire_gen.go
解决办法:
下载https://github.com/protocolbuffers/protobuf源代码,提取src/goole文件夹,复制到$GOPATH下/src路径下,重新generate即可通过。