Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
91
func
truncate(maxSize int, input string) string {
92
if
len(input) < maxSize {
93
return
input
94
}
95
return
input[:maxSize-3] +
"..."
96
}
Callers
1
writeFailure
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected