Open asad-awadia opened 5 years ago
http://protoc-gen-gotemplate.m.42.am/
// here request.(*pb.{{.InputType | splitArray "." | last }}) doing this gives
// here request.(*pb.{{.InputType | splitArray "." | last }})
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 "example.output.tmpl" at <last>: wrong type for value; expected []interface {}; got []string goroutine 1 [running]: main.(*GenericTemplateBasedEncoder).Files(0xc420015a40, 0x12, 0xc42005dc00, 0xc420162000) /go/src/github.com/moul/protoc-gen-gotemplate/encoder.go:194 +0x4f1 main.main() /go/src/github.com/moul/protoc-gen-gotemplate/main.go:130 +0x3e0 --gotemplate_out: protoc-gen-gotemplate: Plugin failed with status code 2.
@moul
http://protoc-gen-gotemplate.m.42.am/
// here request.(*pb.{{.InputType | splitArray "." | last }})
doing this gives