Open domgolonka opened 4 years ago
Hi @domgolonka,
Your usage is correct, I think this is due to a conflict with another package, can you send me the version of various deps: protoc
, protoc-gen-go
How did you install protoc-gen-gotemplate?
$ protoc --version libprotoc 3.12.3
I did these to install it. I had proto and proto- go get -u github.com/golang/protobuf/{proto,protoc-gen-go} go get -u moul.io/protoc-gen-gotemplate
Old issue but adding my experience for others:
I encountered a similar problem and realized that by default protoc-gen-gotemplate does not process .proto files that don't contain a service -- I resolved this by adding the "all=true" option as shown in the README. If your .proto file doesn't contain a service, this is probably what's going on.
$ ls test/
I also tried to put the template directory in: $ protoc -I. -I=../declarations/postmark-sender --gotemplate_out=template_dir=templates,debug=true:test ../declarations/postmark-sender/*.proto WARNING: Package "github.com/golang/protobuf/protoc-gen-go/generator" is deprecated. A future release of golang/protobuf will delete this package, which has long been excluded from the compatibility promise.
$ ls test/
I also tried to put the template directory and output directory in:
$ ls test