1
0
mirror of https://github.com/go-task/task.git synced 2025-11-23 22:24:45 +02:00

feat: pass ast.Call by reference

This commit is contained in:
Pete Davison
2024-01-26 14:34:18 +00:00
parent 65fdb618aa
commit 1ef5cf71d0
13 changed files with 138 additions and 137 deletions

View File

@@ -7,13 +7,13 @@ import (
)
// Parse parses command line argument: tasks and global variables
func Parse(args ...string) ([]ast.Call, *ast.Vars) {
calls := []ast.Call{}
func Parse(args ...string) ([]*ast.Call, *ast.Vars) {
calls := []*ast.Call{}
globals := &ast.Vars{}
for _, arg := range args {
if !strings.Contains(arg, "=") {
calls = append(calls, ast.Call{Task: arg})
calls = append(calls, &ast.Call{Task: arg})
continue
}