diff --git a/cyclic_test.go b/cyclic_test.go index 8406afa2..ab3c3c45 100644 --- a/cyclic_test.go +++ b/cyclic_test.go @@ -8,7 +8,7 @@ import ( func TestCyclicDepCheck(t *testing.T) { isCyclic := &task.Executor{ - Tasks: map[string]*task.Task{ + Tasks: task.Tasks{ "task-a": &task.Task{ Deps: []string{"task-b"}, }, @@ -23,7 +23,7 @@ func TestCyclicDepCheck(t *testing.T) { } isNotCyclic := &task.Executor{ - Tasks: map[string]*task.Task{ + Tasks: task.Tasks{ "task-a": &task.Task{ Deps: []string{"task-c"}, }, diff --git a/task.go b/task.go index 4e171517..d3903477 100644 --- a/task.go +++ b/task.go @@ -20,13 +20,16 @@ const ( // Executor executes a Taskfile type Executor struct { - Tasks map[string]*Task + Tasks Tasks Force bool Watch bool watchingFiles map[string]struct{} } +// Tasks representas a group of tasks +type Tasks map[string]*Task + // Task represents a task type Task struct { Cmds []string