Hi,
I work on a mac and I had to use this command :
protoc api/v1/*.proto \
--gogoslick_out=plugins=grpc:. \
--proto_path=$$(go list -f '{{ .Dir }}' -m github.com/gogo/protobuf) \
--proto_path=.
Notice the gogoslick_out
flag. I had to use that instead of the gogo_out
flag described in the book.
The readme file says :
protoc-gen-gogofast (same as gofast, but imports gogoprotobuf)
protoc-gen-gogofaster (same as gogofast, without XXX_unrecognized, less pointer fields)
protoc-gen-gogoslick (same as gogofaster, but with generated string, gostring and equal methods)
But indeed, I didn’t saw the last paragraph “Most Speed and most customization” describing the command you suggest.
So I guess, it’s not a matter of Mac or Linux. Maybe the gogo/protobuf changed is usage ?
To be fair, there is an old README in the git repo (https://github.com/gogo/protobuf/blob/master/README) descripting usage as
protoc --gogo_out=. -I=.:github.com/gogo/protobuf/protobuf *.proto