I'm using protoc-gen-go to compile C
Protocol Buffers
into Golang
which works great and I can almost go install
the package but I get this error:
cannot find package "google/protobuf"
but I cannot find this package anywhere to download, can anybody tell me what I should do with this? Thanks.
I'm following all steps to doing it from here
then I run protoc --go_out=. *.proto
protoc --go_out=. *.proto
and I get all my files, but the wrong proto
import
as @poopoothegoriall said, please use the protobuf from github, other than code-google. the generated .pb.go file will import "github.com/golang/protobuf/proto"
UPDATE this is my steps:
make install
project https://github.com/google/protobuf.git go get
https://github.com/golang/protobuf protoc --go_out=. xxx.proto
protoc --go_out=. xxx.proto
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.