mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
fix: 消除 state_test.go SA2001 lint 警告
This commit is contained in:
@@ -222,8 +222,9 @@ func TestState_GetOutputMutex(t *testing.T) {
|
|||||||
if mu == nil {
|
if mu == nil {
|
||||||
t.Fatal("GetOutputMutex returned nil")
|
t.Fatal("GetOutputMutex returned nil")
|
||||||
}
|
}
|
||||||
// 验证返回的指针可以正常加锁
|
// 验证返回的指针可以正常加锁解锁
|
||||||
mu.Lock()
|
mu.Lock()
|
||||||
|
_ = 1 //nolint:staticcheck // SA2001: 故意测试空临界区
|
||||||
mu.Unlock()
|
mu.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user