MCPcopy Create free account
hub / github.com/astercloud/aster / truncate

Function truncate

pkg/agent/streaming.go:712–717  ·  view source on GitHub ↗

truncate 截断字符串

(s string, maxLen int)

Source from the content-addressed store, hash-verified

710
711// truncate 截断字符串
712func truncate(s string, maxLen int) string {
713 if len(s) <= maxLen {
714 return s
715 }
716 return s[:maxLen] + "..."
717}
718
719// generateEventID 生成事件 ID
720func generateEventID() string {

Callers 2

StreamMethod · 0.70
runModelStepStreamingMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected