style(benchmark): 修复代码格式和忽略无用错误返回值
This commit is contained in:
parent
668ecde6db
commit
84c26c61ca
@ -40,7 +40,7 @@ func setupStaticTestDir() (string, func()) {
|
||||
}
|
||||
|
||||
cleanup := func() {
|
||||
os.RemoveAll(dir)
|
||||
_ = os.RemoveAll(dir)
|
||||
}
|
||||
|
||||
return dir, cleanup
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user