mirror of
https://github.com/go-task/task.git
synced 2025-08-10 22:42:19 +02:00
feat: parse templates in collection-type variables (#1526)
* refactor: replacer * feat: move traverser to deepcopy package * feat: nested map variable templating * refactor: ReplaceVar function * feat: test cases * fix: TraverseStringsFunc copy value instead of pointer
This commit is contained in:
@@ -4,18 +4,12 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-task/task/v3/internal/templater"
|
||||
"github.com/go-task/task/v3/taskfile/ast"
|
||||
)
|
||||
|
||||
// Templater executes a template engine.
|
||||
// It is provided by the templater.Templater package.
|
||||
type Templater interface {
|
||||
// Replace replaces the provided template string with a rendered string.
|
||||
Replace(tmpl string) string
|
||||
}
|
||||
|
||||
type Output interface {
|
||||
WrapWriter(stdOut, stdErr io.Writer, prefix string, tmpl Templater) (io.Writer, io.Writer, CloseFunc)
|
||||
WrapWriter(stdOut, stdErr io.Writer, prefix string, cache *templater.Cache) (io.Writer, io.Writer, CloseFunc)
|
||||
}
|
||||
|
||||
type CloseFunc func(err error) error
|
||||
|
Reference in New Issue
Block a user