Skip to content

Commit ce27e97

Browse files
committed
hotpath for a blank variable template
1 parent 2607866 commit ce27e97

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

variables.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ func init() {
9797

9898
// ReplaceVariables writes vars into initial string
9999
func (e *Executor) ReplaceVariables(initial string, call Call) (string, error) {
100+
if initial == "" {
101+
return initial, nil
102+
}
103+
100104
templ, err := template.New("").Funcs(templateFuncs).Parse(initial)
101105
if err != nil {
102106
return "", err

0 commit comments

Comments
 (0)