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

Function truncateOutput

pkg/tools/bridge/runtime.go:667–672  ·  view source on GitHub ↗

truncateOutput 截断输出

(s string, maxLen int)

Source from the content-addressed store, hash-verified

665
666// truncateOutput 截断输出
667func truncateOutput(s string, maxLen int) string {
668 if len(s) <= maxLen {
669 return s
670 }
671 return s[:maxLen] + "\n...(truncated)"
672}

Callers 3

ExecuteMethod · 0.85
ExecuteMethod · 0.85
ExecuteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected