feat: v2 版本 #206

Merged
huanghaosheng merged 201 commits from v2 into main 2026-06-22 16:01:28 +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] + "..."
}