MCPcopy Create free account
hub / github.com/auth0/auth0-cli / truncate

Function truncate

internal/display/display.go:327–337  ·  view source on GitHub ↗
(str string, maxLen int)

Source from the content-addressed store, hash-verified

325}
326
327func truncate(str string, maxLen int) string {
328 str = strings.Trim(str, " ")
329
330 if len(str) < maxLen {
331 missing := maxLen - len([]rune(str))
332
333 return str + strings.Repeat(" ", missing)
334 }
335
336 return str[:maxLen-3] + "..."
337}
338
339func indent(text, indent string) string {
340 if text[len(text)-1:] == "\n" {

Callers 3

AsTableRowMethod · 0.85
typeDescMethod · 0.85
StreamMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected