mirror of
https://github.com/go-task/task.git
synced 2025-03-19 21:17:46 +02:00
hotpath for a blank variable template
This commit is contained in:
parent
2607866c49
commit
ce27e973be
@ -97,6 +97,10 @@ func init() {
|
|||||||
|
|
||||||
// ReplaceVariables writes vars into initial string
|
// ReplaceVariables writes vars into initial string
|
||||||
func (e *Executor) ReplaceVariables(initial string, call Call) (string, error) {
|
func (e *Executor) ReplaceVariables(initial string, call Call) (string, error) {
|
||||||
|
if initial == "" {
|
||||||
|
return initial, nil
|
||||||
|
}
|
||||||
|
|
||||||
templ, err := template.New("").Funcs(templateFuncs).Parse(initial)
|
templ, err := template.New("").Funcs(templateFuncs).Parse(initial)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user