mirror of
https://github.com/go-task/task.git
synced 2025-11-25 22:32:55 +02:00
Use colors for some output messages
This commit is contained in:
5
help.go
5
help.go
@@ -5,6 +5,7 @@ import (
|
||||
"sort"
|
||||
"text/tabwriter"
|
||||
|
||||
"github.com/go-task/task/v2/internal/logger"
|
||||
"github.com/go-task/task/v2/internal/taskfile"
|
||||
)
|
||||
|
||||
@@ -12,10 +13,10 @@ import (
|
||||
func (e *Executor) PrintTasksHelp() {
|
||||
tasks := e.tasksWithDesc()
|
||||
if len(tasks) == 0 {
|
||||
e.Logger.Outf("task: No tasks with description available")
|
||||
e.Logger.Outf(logger.Yellow, "task: No tasks with description available")
|
||||
return
|
||||
}
|
||||
e.Logger.Outf("task: Available tasks for this project:")
|
||||
e.Logger.Outf(logger.Default, "task: Available tasks for this project:")
|
||||
|
||||
// Format in tab-separated columns with a tab stop of 8.
|
||||
w := tabwriter.NewWriter(e.Stdout, 0, 8, 0, '\t', 0)
|
||||
|
||||
Reference in New Issue
Block a user