mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-19 07:26:49 +00:00
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:
@@ -731,12 +731,8 @@ func (bot *Engine) LoadExchange(name string) error {
|
||||
return ErrExchangeFailedToLoad
|
||||
}
|
||||
|
||||
var localWG sync.WaitGroup
|
||||
localWG.Add(1)
|
||||
go func() {
|
||||
exch.SetDefaults()
|
||||
localWG.Done()
|
||||
}()
|
||||
exch.SetDefaults()
|
||||
|
||||
exchCfg, err := bot.Config.GetExchangeConfig(name)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -789,7 +785,6 @@ func (bot *Engine) LoadExchange(name string) error {
|
||||
exchCfg.HTTPDebugging = bot.Settings.EnableExchangeHTTPDebugging
|
||||
}
|
||||
|
||||
localWG.Wait()
|
||||
if !bot.Settings.EnableExchangeHTTPRateLimiter {
|
||||
err = exch.DisableRateLimiter()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user