Expose TemplateDir in the AST

This commit is contained in:
Manfred Touron 2016-12-15 10:59:44 +01:00
parent 14d2af18a7
commit 407790640d
No known key found for this signature in database
GPG Key ID: 9CCF47DF1FD978A1

View File

@ -31,6 +31,7 @@ type Ast struct {
File *descriptor.FileDescriptorProto `json:"file"`
RawFilename string `json:"raw-filename"`
Filename string `json:"filename"`
TemplateDir string `json:"template-dir"`
Service *descriptor.ServiceDescriptorProto `json:"service"`
}
@ -93,6 +94,7 @@ func (e *GenericTemplateBasedEncoder) genAst(templateFilename string) (*Ast, err
PWD: pwd,
GoPWD: goPwd,
File: e.file,
TemplateDir: e.templateDir,
RawFilename: templateFilename,
Filename: "",
Service: e.service,