mirror of
https://github.com/go-task/task.git
synced 2025-08-10 22:42:19 +02:00
refactoring
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user