From 0b6f7270ffd06eb6707dfe1f88567106e09d422d Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 3 Jun 2022 01:15:08 +0800 Subject: [PATCH] fix: drop IsZero --- pkg/bbgo/persistence.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/bbgo/persistence.go b/pkg/bbgo/persistence.go index deb04b81f..3cc177463 100644 --- a/pkg/bbgo/persistence.go +++ b/pkg/bbgo/persistence.go @@ -92,10 +92,6 @@ func iterateFieldsByTag(obj interface{}, tagName string, cb StructFieldIterator) sv := reflect.ValueOf(obj) st := reflect.TypeOf(obj) - if sv.IsZero() { - return nil - } - if st.Kind() != reflect.Ptr { return fmt.Errorf("f needs to be a pointer of a struct, %s given", st) }