refactor(compress): extract 128 bytes threshold to MinCompressSize constant

This commit is contained in:
duorameng
2026-07-09 22:01:22 +08:00
parent b67fa5bd58
commit f0967abc6f
2 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -268,7 +268,7 @@ func (l *TinyLog) CompressAndCleanup() (string, error) {
size := stat.Size()
// 如果日志极短,免去压缩和 Base64 编码,直接以 raw: 明文形式返回
if size <= 128 {
if size <= int64(utils.MinCompressSize) {
content, err := io.ReadAll(f)
if err != nil {
return "", err