mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
interact: fix missing make()
This commit is contained in:
parent
dae4afec10
commit
3d9994706b
|
@ -54,6 +54,7 @@ func getStrategySignatures(exchangeStrategies map[string]SingleExchangeStrategy)
|
|||
|
||||
func filterStrategyByInterface(checkInterface interface{}, exchangeStrategies map[string]SingleExchangeStrategy) (strategies map[string]SingleExchangeStrategy, found bool) {
|
||||
found = false
|
||||
strategies = make(map[string]SingleExchangeStrategy)
|
||||
rt := reflect.TypeOf(checkInterface).Elem()
|
||||
for signature, strategy := range exchangeStrategies {
|
||||
if ok := reflect.TypeOf(strategy).Implements(rt); ok {
|
||||
|
@ -412,7 +413,7 @@ func getStrategySignature(strategy SingleExchangeStrategy) (string, error) {
|
|||
|
||||
var signature = path.Base(rv.Type().PkgPath())
|
||||
|
||||
var id = strategy.ID()
|
||||
id := callID(strategy)
|
||||
|
||||
if !strings.EqualFold(id, signature) {
|
||||
signature += "." + strings.ToLower(id)
|
||||
|
|
Loading…
Reference in New Issue
Block a user