chore: go mod tidy / vendor / make deps

This commit is contained in:
2025-10-02 08:25:31 +02:00
parent 1c10e64c58
commit d63a1c28ea
505 changed files with 34448 additions and 35285 deletions

View File

@ -0,0 +1,26 @@
package table
import (
"strings"
"github.com/muesli/reflow/ansi"
"github.com/muesli/reflow/truncate"
)
func limitStr(str string, maxLen int) string {
if maxLen == 0 {
return ""
}
newLineIndex := strings.Index(str, "\n")
if newLineIndex > -1 {
str = str[:newLineIndex] + "…"
}
if ansi.PrintableRuneWidth(str) > maxLen {
// #nosec: G115
return truncate.StringWithTail(str, uint(maxLen), "…")
}
return str
}