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

@@ -34,13 +34,11 @@ func main() {
var wg sync.WaitGroup
for i := range exchange.Exchanges {
name := exchange.Exchanges[i]
wg.Add(1)
go func() {
defer wg.Done()
wg.Go(func() {
if err := engine.Bot.LoadExchange(name); err != nil {
log.Printf("Failed to load exchange %s. Err: %s", name, err)
}
}()
})
}
wg.Wait()
log.Println("Done.")

View File

@@ -74,13 +74,11 @@ func main() {
wrapperConfig.Exchanges[strings.ToLower(name)] = &config.APICredentialsConfig{}
}
if shouldLoadExchange(name) {
wg.Add(1)
go func() {
defer wg.Done()
wg.Go(func() {
if err = bot.LoadExchange(name); err != nil {
log.Printf("Failed to load exchange %s. Err: %s", name, err)
}
}()
})
}
}
wg.Wait()