mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-02 15:10:46 +00:00
tool/exchange_wrapper_coverage: fix regression and implement reflection (#837)
* cmd/tools/exchange: fix regression and implement reflection so as this can dynamically scale to our interface * exchanges: add comment and fix whoopsie * exchanges: fix linter issues * wrapper_cov_tool: add actual full interface method count to get a better perceived deployment * exchanges/tool: addr glorious nits * kraken: remove string in test * exchange_template_tool: fix tmpl issue
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/thrasher-corp/gocryptotrader/common"
|
||||
"github.com/thrasher-corp/gocryptotrader/log"
|
||||
)
|
||||
|
||||
@@ -46,6 +47,9 @@ func (g *GctScriptManager) IsRunning() bool {
|
||||
|
||||
// Start starts gctscript subsystem and creates shutdown channel
|
||||
func (g *GctScriptManager) Start(wg *sync.WaitGroup) (err error) {
|
||||
if wg == nil {
|
||||
return fmt.Errorf("%T %w", wg, common.ErrNilPointer)
|
||||
}
|
||||
if !atomic.CompareAndSwapInt32(&g.started, 0, 1) {
|
||||
return fmt.Errorf("%s %s", caseName, ErrScriptFailedValidation)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user