MCPcopy
hub / github.com/docker/compose / maxStatusLength

Function maxStatusLength

cmd/display/tty.go:436–444  ·  view source on GitHub ↗

maxStatusLength returns the maximum status text length across all lines.

(lines []lineData)

Source from the content-addressed store, hash-verified

434
435// maxStatusLength returns the maximum status text length across all lines.
436func 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

Callers 1

adjustLineWidthMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected