We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Following example in examples/single-package-mode/templates/service.go.tmpl leads to a panic:
examples/single-package-mode/templates/service.go.tmpl
Template:
{{$currentFile := $file.Name | getProtoFile}} {{- range .Service.Method}} {{- $in := .InputType | getMessageType $file}} {{- $out := .OutputType | getMessageType $file}} {{$in.GoType $currentFile.GoPkg.Path}} <-- panics {{- end}} {{/*range **Method*/}}
Output:
panic: template: rpc.go.tmpl:50:34: executing "rpc.go.tmpl" at <$currentFile.GoPkg.P...>: can't evaluate field GoPkg in type *descriptor.File goroutine 1 [running]: main.(*GenericTemplateBasedEncoder).Files(0xc00009d8b0, 0x14, 0xc000029180, 0xc000184000) ~/go/src/moul.io/protoc-gen-gotemplate/encoder.go:213 +0x4df main.main() ~/go/src/moul.io/protoc-gen-gotemplate/main.go:130 +0x411 --gotemplate_out: protoc-gen-gotemplate: Plugin failed with status code 2.
Has the return type of getProtoFile changed? Or is there an error in the template?
getProtoFile
The text was updated successfully, but these errors were encountered:
I think this is where you want to look for the methods available. https://godoc.org/google.golang.org/protobuf/types/descriptorpb
Sorry, something went wrong.
No branches or pull requests
Following example in
examples/single-package-mode/templates/service.go.tmpl
leads to a panic:Template:
Output:
Has the return type of
getProtoFile
changed? Or is there an error in the template?The text was updated successfully, but these errors were encountered: