niceHeader tries to produce a nicer process name. We condense whitespace to make commands split over multiple lines with indentation more legible, and limit the line length to 80 characters.
(preamble string, command string)
| 29 | // make commands split over multiple lines with indentation more legible, and |
| 30 | // limit the line length to 80 characters. |
| 31 | func niceHeader(preamble string, command string) string { |
| 32 | pre := termlog.DefaultPalette.Timestamp.SprintFunc()(preamble) |
| 33 | command = termlog.DefaultPalette.Header.SprintFunc()(shortCommand(command)) |
| 34 | return pre + command |
| 35 | } |
| 36 | |
| 37 | func logOutput(wg *sync.WaitGroup, fp io.ReadCloser, out func(string, ...interface{})) { |
| 38 | defer wg.Done() |
no test coverage detected