From f906139fc8a524aa2c45f8908c1aa52daae2446a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Fri, 17 Jan 2025 14:33:29 +0100 Subject: [PATCH] cli/tree: Use single character triple dot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using 3 characters instead of 1 to ellipsize a long string is wasteful. Signed-off-by: Paweł Gronowski --- cli/command/image/tree.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/command/image/tree.go b/cli/command/image/tree.go index ac6b209ead..881b970743 100644 --- a/cli/command/image/tree.go +++ b/cli/command/image/tree.go @@ -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 }