mirror of
https://github.com/go-task/task.git
synced 2025-01-26 05:27:15 +02:00
refactoring
This commit is contained in:
parent
9cfac1642a
commit
360da29e1f
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user