style(benchmark): 修复代码格式和忽略无用错误返回值

This commit is contained in:
xfy 2026-04-09 12:19:08 +08:00
parent 668ecde6db
commit 84c26c61ca
6 changed files with 12 additions and 12 deletions

View File

@ -40,7 +40,7 @@ func setupStaticTestDir() (string, func()) {
}
cleanup := func() {
os.RemoveAll(dir)
_ = os.RemoveAll(dir)
}
return dir, cleanup

View File

@ -21,7 +21,7 @@ func BenchmarkAccessLogProcess(b *testing.B) {
},
}
al := New(cfg)
defer al.Close()
defer func() { _ = al.Close() }()
mockHandler := func(ctx *fasthttp.RequestCtx) {
ctx.SetStatusCode(fasthttp.StatusOK)
@ -49,7 +49,7 @@ func BenchmarkAccessLogProcessParallel(b *testing.B) {
},
}
al := New(cfg)
defer al.Close()
defer func() { _ = al.Close() }()
mockHandler := func(ctx *fasthttp.RequestCtx) {
ctx.SetStatusCode(fasthttp.StatusOK)