Skip to content

Commit f557ba8

Browse files
committed
remove truncate
1 parent 7b4273c commit f557ba8

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

internal/cmd/output.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,3 @@ func pad(s string, n int) string {
206206
}
207207
return out
208208
}
209-
210-
// truncate shortens a string to maxLen runes, adding … if truncated
211-
func truncate(s string, maxLen int) string {
212-
runes := []rune(s)
213-
if len(runes) <= maxLen {
214-
return s
215-
}
216-
if maxLen <= 1 {
217-
return string(runes[:maxLen])
218-
}
219-
return string(runes[:maxLen-1]) + "…"
220-
}

0 commit comments

Comments
 (0)