From ce27e973be88f4ca20e1798db87658f085629ebb Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Sat, 15 Jul 2017 15:38:57 -0300 Subject: [PATCH] hotpath for a blank variable template --- variables.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/variables.go b/variables.go index b3e7dff2..3bd60dfc 100644 --- a/variables.go +++ b/variables.go @@ -97,6 +97,10 @@ func init() { // ReplaceVariables writes vars into initial string func (e *Executor) ReplaceVariables(initial string, call Call) (string, error) { + if initial == "" { + return initial, nil + } + templ, err := template.New("").Funcs(templateFuncs).Parse(initial) if err != nil { return "", err