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

refactoring

This commit is contained in:
jaedle 2019-03-04 12:27:10 +01:00
parent c7f17b5319
commit f66edbad50

View File

@ -9,14 +9,21 @@ import (
func PrintAll(l *logger.Logger, t *taskfile.Taskfile, c []taskfile.Call) { func PrintAll(l *logger.Logger, t *taskfile.Taskfile, c []taskfile.Call) {
for i, call := range c { for i, call := range c {
if i > 0 { printSpaceBetweenSummaries(i, l)
l.Outf("")
l.Outf("")
}
Print(l, t.Tasks[call.Task]) Print(l, t.Tasks[call.Task])
} }
} }
func printSpaceBetweenSummaries(i int, l *logger.Logger) {
spaceRequired := i > 0
if !spaceRequired {
return
}
l.Outf("")
l.Outf("")
}
func Print(l *logger.Logger, t *taskfile.Task) { func Print(l *logger.Logger, t *taskfile.Task) {
printTaskName(l, t) printTaskName(l, t)
if hasSummary(t) { if hasSummary(t) {