()
| 49 | } |
| 50 | |
| 51 | func watchHeader() string { |
| 52 | timeStr := libtime.LocalHourNow() |
| 53 | width := getTerminalWidth() |
| 54 | numExtraChars := 4 |
| 55 | padding := strings.Repeat(" ", libmath.MaxInt(width-len(_cmdStr)-len(timeStr)-numExtraChars, 0)) |
| 56 | return fmt.Sprintf("$ %s %s%s", _cmdStr, padding, libtime.LocalHourNow()) |
| 57 | } |
| 58 | |
| 59 | func rerun(watchFlag bool, f func() (string, error)) { |
| 60 | if watchFlag { |
no test coverage detected