1
0
mirror of https://github.com/go-task/task.git synced 2025-01-26 05:27:15 +02:00

refactoring

This commit is contained in:
jaedle 2019-03-04 13:04:04 +01:00
parent 9cfac1642a
commit 360da29e1f

View File

@ -26,6 +26,12 @@ func printSpaceBetweenSummaries(l *logger.Logger, i int) {
func PrintTask(l *logger.Logger, t *taskfile.Task) {
printTaskName(l, t)
printTaskDescribingText(t, l)
printTaskDependencies(l, t)
printTaskCommands(l, t)
}
func printTaskDescribingText(t *taskfile.Task, l *logger.Logger) {
if hasSummary(t) {
printTaskSummary(l, t)
} else if hasDescription(t) {
@ -33,8 +39,6 @@ func PrintTask(l *logger.Logger, t *taskfile.Task) {
} else {
printNoDescriptionOrSummary(l)
}
printTaskDependencies(l, t)
printTaskCommands(l, t)
}
func hasSummary(t *taskfile.Task) bool {