I have a pb file in $GOPATH/src/github.com/cs/p/a/a.proto
, and another pb file in $GOPATH/src/github.com/cs/p/b/b.proto
. And a.proto
import b.proto
like this:
import "b/b.proto"
Now I enter $GOPATH/src/github.com/cs/p
and execute the following command:
protoc --go_out=plugins=grpc:. a/a.proto
Then I find a.pb.go
is generated in $GOPATH/src/github.com/cs/p/a/
, within which there's such statement: import "b"
.
When I build the project, it says it cannot find package b
. What should I do ? Acutally I hope a.pb.go
import b
like this: import github.com/cs/p/b
. Could it be done ?