maxStatusLength returns the maximum status text length across all lines.
(lines []lineData)
| 434 | |
| 435 | // maxStatusLength returns the maximum status text length across all lines. |
| 436 | func maxStatusLength(lines []lineData) int { |
| 437 | var maxLen int |
| 438 | for i := range lines { |
| 439 | if len(lines[i].status) > maxLen { |
| 440 | maxLen = len(lines[i].status) |
| 441 | } |
| 442 | } |
| 443 | return maxLen |
| 444 | } |
| 445 | |
| 446 | // maxBeforeStatusWidth computes the maximum width before statusPad across all lines. |
| 447 | // This is: space(1) + spinner(1) + prefix + space(1) + taskID + progress |