handle statement import of proto file

This commit is contained in:
jhayotte
2017-05-01 23:55:55 +02:00
parent c73a4b8c46
commit 91ebb6e521
9 changed files with 266 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
// Code generated by protoc-gen-gotemplate
package {{.File.Package}}
import (
"github.com/moul/protoc-gen-gotemplate/examples/import/output/models/article"
"github.com/moul/protoc-gen-gotemplate/examples/import/output/models/common"
)
type Repository interface {
{{range $m := .Service.Method}}{{with $t := $m.InputType | getMessageType $.File}} {{$m.Name}}({{range $f := $t.Field}}{{$f.Name|lowerCamelCase}} {{$f| goTypeWithPackage }} {{end}}) ({{with $out := $m.OutputType | getMessageType $.File}}{{range $f := $out.Field}}{{$f | goTypeWithPackage}}, {{end}}{{end}} error){{end}}{{end}}
}