1
0
mirror of https://github.com/go-task/task.git synced 2025-02-05 13:25:14 +02:00

Abstract Tasks type

This commit is contained in:
Andrey Nering 2017-06-04 16:41:38 -03:00
parent 09e6d5269d
commit b530cba0d5
2 changed files with 6 additions and 3 deletions

View File

@ -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"},
},

View File

@ -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