From d236d298109208d194bf9c305dda03acbd1cc8d2 Mon Sep 17 00:00:00 2001 From: Albert Nigmatzianov Date: Mon, 8 May 2017 23:00:14 +0200 Subject: [PATCH] cmd: Make tmpl local variable Fix CircleCI tests --- cobra/cmd/helpers.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cobra/cmd/helpers.go b/cobra/cmd/helpers.go index fc9dd85..e5324c5 100644 --- a/cobra/cmd/helpers.go +++ b/cobra/cmd/helpers.go @@ -83,11 +83,8 @@ func exists(path string) bool { return false } -var tmpl = template.New("").Funcs(template.FuncMap{"comment": commentifyString}) - func executeTemplate(tmplStr string, data interface{}) (string, error) { - var err error - tmpl, err = tmpl.Parse(tmplStr) + tmpl, err := template.New("").Funcs(template.FuncMap{"comment": commentifyString}).Parse(tmplStr) if err != nil { return "", err }