protoc-gen-gotemplate icon indicating copy to clipboard operation
protoc-gen-gotemplate copied to clipboard

:open_file_folder: generic protocol generator based on golang's text/template (grpc/protobuf)

Results 28 protoc-gen-gotemplate issues
Sort by recently updated
recently updated
newest added

Following example in `examples/single-package-mode/templates/service.go.tmpl` leads to a panic: **Template:** ```{{$file := .File}} {{$currentFile := $file.Name | getProtoFile}} {{- range .Service.Method}} {{- $in := .InputType | getMessageType $file}} {{- $out :=...

First of all-- fantastic library, thanks for all the work! For my use case I need one output file, but I'd like to use multiple proto files each with their...

http://protoc-gen-gotemplate.m.42.am/ `// here request.(*pb.{{.InputType | splitArray "." | last }})` doing this gives ``` 2019/08/04 15:46:10 new encoder: file="example.proto" service="RouteGuide" template-dir="/tmp/pggt313081003" 2019/08/04 15:46:10 new template: "example.output.tmpl" panic: template: example.output.tmpl:27:53: executing...

This is a really fascinating project. Using grpc and templating makes it possible to do allot of codegen. I think what I want to do is not possible with this...

Here's an example .proto with "timestamp.proto" imported: ``` protobuf syntax = "proto3"; package timesvc; import "google/protobuf/timestamp.proto"; message NowReq {} message NowReply { google.protobuf.Timestamp now = 1; } service TimeSvc {...

in the service.proto file, https://github.com/sigmonsays/protoc-gen-gotemplate-examples/blob/master/src/ex1/service.proto we have Color defined as a enum type. It is not collected in the template, which can be seen here, https://github.com/sigmonsays/protoc-gen-gotemplate-examples/blob/master/src/ex1/templates/dump.txt.tmpl The result of the...

I've noticed when I have errors in my template, the code fires and completes but never prints an error. Is this behavior others are seeing? I started to dive into...

Describe the steps required to add a helper for a new programming language and the way to use it. Perhaps it would be a good opportunity to refactor our `helper.go`...

enhancement
help wanted