mirror of
https://github.com/docker/compose.git
synced 2026-10-12 02:13:08 +00:00
pad can be negative on small terminal
Signed-off-by: Nicolas De Loof <[email protected]>
This commit is contained in:
committed by
Nicolas De loof
parent
4434cea535
commit
6a0398d786
+5
-1
@@ -281,7 +281,11 @@ func numDone(events map[string]Event) int {
|
||||
func align(l, r string, w int) string {
|
||||
ll := lenAnsi(l)
|
||||
lr := lenAnsi(r)
|
||||
pad := strings.Repeat(" ", w-ll-lr)
|
||||
pad := ""
|
||||
count := w - ll - lr
|
||||
if count > 0 {
|
||||
pad = strings.Repeat(" ", count)
|
||||
}
|
||||
return fmt.Sprintf("%s%s%s\n", l, pad, r)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user