linters: Add modernise tool check and fix issues (#2012)

* linters: Add modernise tool check and fix issues

* engine: Simplify exch.SetDefaults call and remove localWG

* CI: Revert config versions lint workflow
This commit is contained in:
Adrian Gallagher
2025-08-26 12:45:13 +10:00
committed by GitHub
parent 85403fe801
commit d5b2cf1759
22 changed files with 103 additions and 159 deletions

View File

@@ -329,8 +329,7 @@ func TestProcessOrderbook(t *testing.T) {
break
}
m.Unlock()
wg.Add(1)
go func() {
wg.Go(func() {
newName := "Exchange" + strconv.FormatInt(rand.Int63(), 10) //nolint:gosec // no need to import crypo/rand for testing
newPairs := currency.NewPair(currency.NewCode("BTC"+strconv.FormatInt(rand.Int63(), 10)),
currency.NewCode("USD"+strconv.FormatInt(rand.Int63(), 10))) //nolint:gosec // no need to import crypo/rand for testing
@@ -351,13 +350,11 @@ func TestProcessOrderbook(t *testing.T) {
t.Error(err)
catastrophicFailure = true
m.Unlock()
wg.Done()
return
}
testArray = append(testArray, quick{Name: newName, P: newPairs, Bids: bids, Asks: asks})
m.Unlock()
wg.Done()
}()
})
}
wg.Wait()