From e448cf168ca53d8e1a661a8ce656b6ca35475a9a Mon Sep 17 00:00:00 2001 From: Stanislas Michalak Date: Mon, 23 Jul 2018 18:58:32 +0200 Subject: [PATCH] Remove logger need from the render package (#1186) --- render/template.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/render/template.go b/render/template.go index 8cc072cf8..d33277440 100644 --- a/render/template.go +++ b/render/template.go @@ -1,6 +1,7 @@ package render import ( + "fmt" "html/template" "io" "os" @@ -9,7 +10,6 @@ import ( "strings" "github.com/pkg/errors" - "github.com/sirupsen/logrus" // this blank import is here because dep doesn't // handle transitive dependencies correctly @@ -119,8 +119,7 @@ func (s templateRenderer) exec(name string, data Data) (template.HTML, error) { for _, ext := range s.exts(name) { te, ok := s.TemplateEngines[ext] if !ok { - logrus.Errorf("could not find a template engine for %s\n", ext) - continue + return "", fmt.Errorf("could not find a template engine for %s", ext) } body, err = te(body, data, helpers) if err != nil {