过滤无价值日志并实现最近24小时倒序分页查询
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-09-09 01:06:45 +08:00
1 parent 161bc3a345
commit bb4ac4d5f5
20 files changed
+765 -132

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
package logpolicy
import "strings"
// EmptyMessage 仅识别空白和纯装饰线,不猜测业务文案、状态或未知格式的价值。
func EmptyMessage(message string) bool {
message = strings.TrimSpace(strings.ReplaceAll(message, "\x00", ""))
if message == "" {
return true
}
return len([]rune(message)) >= 3 && strings.Trim(message, "*-=─━_~ \t\r\n") == ""
}