From 5c4fdc8e9e4e53a73cf137dcdff1bcb66dd38654 Mon Sep 17 00:00:00 2001 From: "zhangkun9038@dingtalk.com" Date: Sun, 19 Jan 2025 04:35:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E6=9F=A52D=E5=91=A8=E6=9C=9FsortedSet?= =?UTF-8?q?=E5=91=A8=E6=9C=9F=E9=97=B4=E9=9A=94=E4=B8=8D=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- candle.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/candle.go b/candle.go index e2e0e34..3beac4d 100644 --- a/candle.go +++ b/candle.go @@ -188,11 +188,11 @@ func (core *Core) SaveCandle(instId string, period string, rsp *CandleData, dura for k, v := range segments { logrus.Warn("fetch segments:", k, v) cs := CandleSegment{} + sv, _ := json.Marshal(v) + json.Unmarshal(sv, &cs) if !cs.Enabled { continue } - sv, _ := json.Marshal(v) - json.Unmarshal(sv, &cs) logrus.Warn("fetch segments2: cs.Seg", cs.Seg, ", period:", period) if cs.Seg == period {