MCPcopy Create free account
hub / github.com/devfeel/mapper / getFieldMappings

Function getFieldMappings

mapper_func.go:22–28  ·  view source on GitHub ↗

getFieldMappings 获取字段映射缓存

(fromType, toType reflect.Type)

Source from the content-addressed store, hash-verified

20
21// getFieldMappings 获取字段映射缓存
22func getFieldMappings(fromType, toType reflect.Type) ([]fieldMapping, bool) {
23 key := cacheKey(fromType, toType)
24 if cached, ok := fieldMappingCache.Load(key); ok {
25 return cached.([]fieldMapping), true
26 }
27 return nil, false
28}
29
30// cacheKey 生成缓存键
31func cacheKey(fromType, toType reflect.Type) string {

Callers 3

MapDirectFunction · 0.85
MapDirectSliceFunction · 0.85
SafeMapDirectFunction · 0.85

Calls 1

cacheKeyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…