From 635540605288042014abc59f68d117434a91bafe Mon Sep 17 00:00:00 2001 From: Pmoranga Date: Fri, 21 Jan 2022 12:40:06 +0100 Subject: [PATCH] Show error if template parsing fail --- internal/generate/generate_modules.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/generate/generate_modules.go b/internal/generate/generate_modules.go index 5365ec4a..a287917f 100644 --- a/internal/generate/generate_modules.go +++ b/internal/generate/generate_modules.go @@ -193,6 +193,9 @@ func executeTemplates(templates []*fileConfig, data interface{}, delimiters []st // @TODO if strict mode then only copy file name := path.Base(source) template, err := template.New(name).Delims(leftDelim, rightDelim).Funcs(util.FuncMap).ParseFiles(source) + if err != nil { + flog.Errorf("Error in template '%s': %v", source, err) + } err = template.Execute(f, data) if err != nil {