zeromicro / go-zero

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

github.com/gogo/protobuf/gogoproto/gogo.proto: File not found. #3652

Open d-anz opened 1 year ago

d-anz commented 1 year ago

$ goctl rpc protoc proto\forward.proto --go_out=. --go-grpc_out=. --zrpc_out=. github.com/gogo/protobuf/gogoproto/gogo.proto: File not found. proto/forward.proto:7:1: Import "github.com/gogo/protobuf/gogoproto/gogo.proto" was not found or had errors.

forward.proto:

syntax = "proto3"; package forward;

option go_package="./forward";

import "google/protobuf/descriptor.proto"; import "github.com/gogo/protobuf/gogoproto/gogo.proto";

message OrderSendRequest{ string channel = 1; string order = 2; string data = 3; string requestID = 4; }

message OrderSendResponse{ int32 code = 1; string message = 2; bytes data = 3[(gogoproto.customtype) = "InterfaceType"];; }

message ForwardRequest{ string channel = 1; }

message ForwardResponse{ string channel = 1; string cipher = 2; }

service ForwardService { // Send 发送指令 rpc Send(OrderSendRequest) returns(OrderSendResponse); }

kesonan commented 1 year ago

You should specify the directory path where the proto is located by -I, which is the same as protoc

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 30 days with no activity.

willis-yang commented 1 day ago

@d-anz had you finished it yet?