I want to generate .pb.go files to the ./pb folder. I have my .proto files under ./proto folder. I ran this command in my root folder:
protoc --go_out=./pb/ --go_opt=paths=source_relative ./proto/*.proto
However, my .go files always end up under ./pb/proto instead of ./pb folder, like this:
.
|____pb
| |____proto
| | |____my_message_one.pb.go
| | |____my_message_two.pb.go
| | |____my_message_three.pb.go
The name of my module in go.mod is module grpc_tutorial and here's an example my .proto file:
syntax = "proto3";
option go_package="./grpc_tutorial/pb";
message Screen {
string some_message = 1;
string some_message_two = 2;
bool some_bool = 3;
}
Is there anything wrong with my command or proto file?