fix: resolve golangci-lint errcheck and staticcheck warnings

This commit is contained in:
ZacharyZcR
2026-05-12 15:41:15 +08:00
parent 660e0574ef
commit 7db89e0bd3
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -158,11 +158,11 @@ func (l *Logger) log(level LogLevel, content string) {
lines := strings.Split(content, "\n")
for _, line := range lines {
if line != "" {
fmt.Fprintf(l.debugFile, "[%s] %s %s\n", timestamp, prefix, line)
_, _ = fmt.Fprintf(l.debugFile, "[%s] %s %s\n", timestamp, prefix, line)
}
}
} else {
fmt.Fprintf(l.debugFile, "[%s] %s %s\n", timestamp, prefix, content)
_, _ = fmt.Fprintf(l.debugFile, "[%s] %s %s\n", timestamp, prefix, content)
}
}