Merge pull request #661 from c9s/fix/persistence-snapshot

fix: drop IsZero
This commit is contained in:
Yo-An Lin 2022-06-03 01:18:54 +08:00 committed by GitHub
commit 5eec6180bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}