增加反射结果的缓存

This commit is contained in:
白茶清欢 2023-02-01 20:35:33 +08:00
parent cd9bc4aadb
commit 8ead62c058

View File

@ -79,6 +79,7 @@ func (rt *ReflectType) Do(dataFlag string, data interface{}) *StructInfo {
rt.fillMappingRule(field, reflectType.Field(idx).Tag.Get(MappingTag)) rt.fillMappingRule(field, reflectType.Field(idx).Tag.Get(MappingTag))
res.StructFieldList = append(res.StructFieldList, field) res.StructFieldList = append(res.StructFieldList, field)
} }
rt.cacheTable[dataFlag] = res
return res return res
} }