Fix lint errors

This commit is contained in:
世界
2026-05-13 22:37:05 +08:00
parent 338aa551d1
commit 5e7fd7ad78
79 changed files with 219 additions and 667 deletions

View File

@@ -8,8 +8,6 @@ import (
"runtime/debug"
)
var crashOutputFile *os.File
func RedirectStderr(path string) error {
if stats, err := os.Stat(path); err == nil && stats.Size() > 0 {
_ = os.Rename(path, path+".old")
@@ -32,6 +30,5 @@ func RedirectStderr(path string) error {
os.Remove(outputFile.Name())
return err
}
crashOutputFile = outputFile
return nil
return outputFile.Close()
}