mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-30 15:10:40 +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:
@@ -81,25 +81,20 @@ func (bt *BackTest) RunLive() error {
|
||||
if bt.LiveDataHandler == nil {
|
||||
return errLiveOnly
|
||||
}
|
||||
var err error
|
||||
if bt.LiveDataHandler.IsRealOrders() {
|
||||
err = bt.LiveDataHandler.UpdateFunding(false)
|
||||
if err != nil {
|
||||
if err := bt.LiveDataHandler.UpdateFunding(false); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
err = bt.LiveDataHandler.Start()
|
||||
if err != nil {
|
||||
if err := bt.LiveDataHandler.Start(); err != nil {
|
||||
return err
|
||||
}
|
||||
bt.wg.Add(1)
|
||||
go func() {
|
||||
err = bt.liveCheck()
|
||||
if err != nil {
|
||||
|
||||
bt.wg.Go(func() {
|
||||
if err := bt.liveCheck(); err != nil {
|
||||
log.Errorln(common.LiveStrategy, err)
|
||||
}
|
||||
bt.wg.Done()
|
||||
}()
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user