aboutsummaryrefslogtreecommitdiff
path: root/cmd/krino/sort.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 23:51:33 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 23:51:33 +0200
commit1f1a303c617057f149b4f0d748ee0a195484642c (patch)
tree1e42ca0f53af3a5e39e31f0bc3475979a3a589dd /cmd/krino/sort.go
parent1bb5097986558ee7dd3aeaf8e7defefdf91ae4b6 (diff)
downloadkrino-1f1a303c617057f149b4f0d748ee0a195484642c.tar.gz
krino-1f1a303c617057f149b4f0d748ee0a195484642c.zip
output: wrap by terminal columns, names cannot fake step lines, -v lists unscanned destinations
Diffstat (limited to 'cmd/krino/sort.go')
-rw-r--r--cmd/krino/sort.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/krino/sort.go b/cmd/krino/sort.go
index 83ede11..163d388 100644
--- a/cmd/krino/sort.go
+++ b/cmd/krino/sort.go
@@ -14,7 +14,6 @@ import (
"sort"
"strings"
"syscall"
- "unicode/utf8"
"golang.org/x/term"
@@ -582,7 +581,7 @@ func chainOutcomes(chains []plan.Chain) (excluded, allSkipped int) {
func relWidth(rels []string) int {
w := 0
for _, s := range rels {
- if n := utf8.RuneCountInString(s); n > w {
+ if n := cols(s); n > w {
w = n
}
}
@@ -595,7 +594,7 @@ func relWidth(rels []string) int {
// padCell pads s to width w (runes, not bytes) with trailing spaces; s
// already at or beyond w is left unpadded.
func padCell(s string, w int) string {
- n := utf8.RuneCountInString(s)
+ n := cols(s)
if n >= w {
return s
}