1
0
mirror of https://github.com/go-task/task.git synced 2025-01-08 04:04:08 +02:00

refactoring

This commit is contained in:
jaedle 2019-02-24 15:45:39 +01:00
parent 9e9ffeb5d5
commit 3999480d64

View File

@ -92,10 +92,8 @@ func (e *Executor) printTaskSummary(task string) {
e.Logger.Outf("task: " + task)
e.Logger.Outf("")
printTaskDetailedDescription(s, e.Logger)
printTaskSummary(s, e.Logger)
printTaskDependencies(t.Deps, e.Logger)
e.Logger.Outf("")
printCommands(t.Cmds, e.Logger)
}
@ -116,9 +114,10 @@ func printTaskDependencies(deps []*taskfile.Dep, logger *logger.Logger) {
logger.Outf(" - %s", d.Task)
}
}
logger.Outf("")
}
func printTaskDetailedDescription(description string, Logger *logger.Logger) {
func printTaskSummary(description string, Logger *logger.Logger) {
lines := strings.Split(description, "\n")
for i, line := range lines {
notLastLine := i+1 < len(lines)
@ -126,7 +125,6 @@ func printTaskDetailedDescription(description string, Logger *logger.Logger) {
Logger.Outf(line)
}
}
}
// Setup setups Executor's internal state