Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astercloud/aster
/ truncate
Function
truncate
examples/session-postgres/main.go:276–281 ·
view source on GitHub ↗
(s string, maxLen int)
Source
from the content-addressed store, hash-verified
274
}
275
276
func
truncate(s string, maxLen int) string {
277
if
len(s) <= maxLen {
278
return
s
279
}
280
return
s[:maxLen] +
"..."
281
}
282
283
// 生产环境最佳实践
284
Callers
1
queryExample
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected