1
0
mirror of https://github.com/go-task/task.git synced 2025-08-10 22:42:19 +02:00

refactor: executor functional options (#2085)

* refactor: executor functional options

* refactor: minor tidy up of list code

* fix: WithVersionCheck missing from call to NewExecutor

* feat: docstrings for structs with functional options

* refactor: prefix the functional options with the name of the struct they belong to
This commit is contained in:
Pete Davison
2025-03-10 20:38:25 +00:00
committed by GitHub
parent 8181352d54
commit ffeb3bcc3f
10 changed files with 1023 additions and 724 deletions

View File

@@ -72,13 +72,13 @@ func (e *Executor) readTaskfile(node taskfile.Node) error {
}
reader := taskfile.NewReader(
node,
taskfile.WithInsecure(e.Insecure),
taskfile.WithDownload(e.Download),
taskfile.WithOffline(e.Offline),
taskfile.WithTimeout(e.Timeout),
taskfile.WithTempDir(e.TempDir.Remote),
taskfile.WithDebugFunc(debugFunc),
taskfile.WithPromptFunc(promptFunc),
taskfile.ReaderWithInsecure(e.Insecure),
taskfile.ReaderWithDownload(e.Download),
taskfile.ReaderWithOffline(e.Offline),
taskfile.ReaderWithTimeout(e.Timeout),
taskfile.ReaderWithTempDir(e.TempDir.Remote),
taskfile.ReaderWithDebugFunc(debugFunc),
taskfile.ReaderWithPromptFunc(promptFunc),
)
graph, err := reader.Read()
if err != nil {