mirror of
https://github.com/go-task/task.git
synced 2025-06-15 00:15:10 +02:00
feat: pass ast.Call by reference
This commit is contained in:
@ -17,16 +17,16 @@ import (
|
||||
|
||||
// CompiledTask returns a copy of a task, but replacing variables in almost all
|
||||
// properties using the Go template package.
|
||||
func (e *Executor) CompiledTask(call ast.Call) (*ast.Task, error) {
|
||||
func (e *Executor) CompiledTask(call *ast.Call) (*ast.Task, error) {
|
||||
return e.compiledTask(call, true)
|
||||
}
|
||||
|
||||
// FastCompiledTask is like CompiledTask, but it skippes dynamic variables.
|
||||
func (e *Executor) FastCompiledTask(call ast.Call) (*ast.Task, error) {
|
||||
func (e *Executor) FastCompiledTask(call *ast.Call) (*ast.Task, error) {
|
||||
return e.compiledTask(call, false)
|
||||
}
|
||||
|
||||
func (e *Executor) compiledTask(call ast.Call, evaluateShVars bool) (*ast.Task, error) {
|
||||
func (e *Executor) compiledTask(call *ast.Call, evaluateShVars bool) (*ast.Task, error) {
|
||||
origTask, err := e.GetTask(call)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user