cli/tree: Use single character triple dot
Using 3 characters instead of 1 to ellipsize a long string is wasteful. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
f4a68da195
commit
f906139fc8
@ -309,7 +309,7 @@ type imgColumn struct {
|
|||||||
func truncateRunes(s string, length int) string {
|
func truncateRunes(s string, length int) string {
|
||||||
runes := []rune(s)
|
runes := []rune(s)
|
||||||
if len(runes) > length {
|
if len(runes) > length {
|
||||||
return string(runes[:length-3]) + "..."
|
return string(runes[:length-1]) + "…"
|
||||||
}
|
}
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user