MCPcopy
hub / github.com/tinode/chat / truncateStringIfTooLong

Function truncateStringIfTooLong

server/utils.go:698–704  ·  view source on GitHub ↗

Truncate string if it's too long. Used in logging.

(s string)

Source from the content-addressed store, hash-verified

696
697// Truncate string if it's too long. Used in logging.
698func truncateStringIfTooLong(s string) string {
699 if len(s) <= 1024 {
700 return s
701 }
702
703 return s[:1024] + "..."
704}
705
706// Convert relative filepath to absolute.
707func toAbsolutePath(base, path string) string {

Callers 1

MessageLoopMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…