mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 16:55:15 +00:00
fix: check if interval is empty string
This commit is contained in:
parent
d86338d6e6
commit
d7f83a45b3
|
@ -609,7 +609,7 @@ type KLineCallBack func(k KLine)
|
||||||
|
|
||||||
func KLineWith(symbol string, interval Interval, callback KLineCallBack) KLineCallBack {
|
func KLineWith(symbol string, interval Interval, callback KLineCallBack) KLineCallBack {
|
||||||
return func(k KLine) {
|
return func(k KLine) {
|
||||||
if k.Symbol != symbol || k.Interval != interval {
|
if k.Symbol != symbol || (k.Interval != "" && k.Interval != interval) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
callback(k)
|
callback(k)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user