1
0
mirror of https://github.com/go-task/task.git synced 2025-06-17 00:17:51 +02:00

feat: aliases

feat: add aliases to --list and --list-all flags

feat: add aliases to --summary

feat: enable aliases for included tasks

tests: added alias unit tests
This commit is contained in:
Pete Davison
2022-10-01 22:39:44 +00:00
parent d2061ec898
commit 376a6182eb
15 changed files with 183 additions and 21 deletions

View File

@ -3,6 +3,7 @@ package task
import (
"errors"
"fmt"
"strings"
"mvdan.cc/sh/v3/interp"
)
@ -20,6 +21,15 @@ func (err *taskNotFoundError) Error() string {
return fmt.Sprintf(`task: Task %q not found`, err.taskName)
}
type multipleTasksWithAliasError struct {
aliasName string
taskNames []string
}
func (err *multipleTasksWithAliasError) Error() string {
return fmt.Sprintf(`task: Multiple tasks (%s) with alias %q found`, strings.Join(err.taskNames, ", "), err.aliasName)
}
type taskInternalError struct {
taskName string
}