From 407790640dc5c713b62f92485883ed35bee16e3f Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Thu, 15 Dec 2016 10:59:44 +0100 Subject: [PATCH] Expose TemplateDir in the AST --- encoder.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/encoder.go b/encoder.go index 893bce7..57d800a 100644 --- a/encoder.go +++ b/encoder.go @@ -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,