1
0
mirror of https://github.com/go-task/task.git synced 2025-11-29 22:48:03 +02:00

print command stub on details

This commit is contained in:
jaedle
2019-02-24 14:08:27 +01:00
parent 31b60f7f60
commit f1d83e92a7
2 changed files with 12 additions and 4 deletions

12
task.go
View File

@@ -91,11 +91,19 @@ func (e *Executor) printTaskDetails(task string) {
e.Logger.Outf("task: " + task)
e.Logger.Outf("")
lines := strings.Split(s, "\n")
Logger := e.Logger
displayTaskDetailedDescription(s, Logger)
e.Logger.Outf("")
e.Logger.Outf("Commands:")
}
func displayTaskDetailedDescription(description string, Logger *logger.Logger) {
lines := strings.Split(description, "\n")
for i, line := range lines {
notLastLine := i+1 < len(lines)
if notLastLine || line != "" {
e.Logger.Outf(line)
Logger.Outf(line)
}
}
}