mirror of
https://github.com/samber/lo.git
synced 2025-09-26 20:11:13 +08:00
lint 💄
This commit is contained in:
@@ -12,12 +12,12 @@ func testWithTimeout(t *testing.T, timeout time.Duration) {
|
|||||||
testFinished := make(chan struct{})
|
testFinished := make(chan struct{})
|
||||||
t.Cleanup(func() { close(testFinished) })
|
t.Cleanup(func() { close(testFinished) })
|
||||||
|
|
||||||
go func() {
|
go func() { //nolint:staticcheck
|
||||||
select {
|
select {
|
||||||
case <-testFinished:
|
case <-testFinished:
|
||||||
case <-time.After(timeout):
|
case <-time.After(timeout):
|
||||||
t.Errorf("test timed out after %s", timeout)
|
t.Errorf("test timed out after %s", timeout)
|
||||||
t.FailNow()
|
t.FailNow() //nolint:govet,staticcheck
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user