mirror of
https://github.com/go-task/task.git
synced 2025-07-13 01:30:33 +02:00
hotpath for a blank variable template
This commit is contained in:
@ -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
|
||||||
|
Reference in New Issue
Block a user