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:
Paweł Gronowski 2025-01-17 14:33:29 +01:00
parent f4a68da195
commit f906139fc8
No known key found for this signature in database
GPG Key ID: B85EFCFE26DEF92A

View File

@ -309,7 +309,7 @@ type imgColumn struct {
func truncateRunes(s string, length int) string {
runes := []rune(s)
if len(runes) > length {
return string(runes[:length-3]) + "..."
return string(runes[:length-1]) + "…"
}
return s
}