feat: 实现日志追踪链路 #186

Merged
huanghaosheng merged 31 commits from develop into v2 2026-06-21 23:24:18 +08:00
Showing only changes of commit 104b28efd3 - Show all commits

View File

@@ -0,0 +1,9 @@
package util
// Truncate 截断字符串到指定长度,超出部分用 "..." 替换
func Truncate(s string, maxLen int) string {
if len(s) <= maxLen {
return s
}
return s[:maxLen] + "..."
}