MCPcopy Create free account
hub / github.com/conventionalcommit/commitlint / truncate

Function truncate

lint/formatter/default.go:91–96  ·  view source on GitHub ↗
(maxSize int, input string)

Source from the content-addressed store, hash-verified

89}
90
91func truncate(maxSize int, input string) string {
92 if len(input) < maxSize {
93 return input
94 }
95 return input[:maxSize-3] + "..."
96}

Callers 1

writeFailureMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected