Multiple packages had their own private truncate implementations: - channels/telegram.go: truncateString (byte-based, no "...") - channels/dingtalk.go: truncateStringDingTalk (byte-based, no "...") - voice/transcriber.go: truncateText (byte-based, with "...") All three are functionally equivalent to the existing utils.Truncate, which already handles rune-safe truncation and appends "..." correctly. Replace all private copies with utils.Truncate and delete the dead code. |
||
|---|---|---|
| .. | ||
| base.go | ||
| dingtalk.go | ||
| discord.go | ||
| feishu.go | ||
| maixcam.go | ||
| manager.go | ||
| qq.go | ||
| telegram.go | ||
| whatsapp.go | ||