equalFieldType() — fiber Function Reference
Architecture documentation for the equalFieldType() function in mapping.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 0924903c_1cba_479d_882f_6c9c245c09c1["equalFieldType()"] 5a1aea01_8a49_a350_626b_5da5e78187fd["mapping.go"] 0924903c_1cba_479d_882f_6c9c245c09c1 -->|defined in| 5a1aea01_8a49_a350_626b_5da5e78187fd e27db738_c4ff_98cd_3a94_c598464acdb1["assignBindData()"] e27db738_c4ff_98cd_3a94_c598464acdb1 -->|calls| 0924903c_1cba_479d_882f_6c9c245c09c1 04280090_0c74_3319_740c_f46b90cdf032["isStringKeyMap()"] 0924903c_1cba_479d_882f_6c9c245c09c1 -->|calls| 04280090_0c74_3319_740c_f46b90cdf032 3aedfe5e_1d6b_c889_0940_8862df009efb["getFieldCache()"] 0924903c_1cba_479d_882f_6c9c245c09c1 -->|calls| 3aedfe5e_1d6b_c889_0940_8862df009efb ff5020ca_11ae_230b_e44f_8630ed808405["buildFieldInfo()"] 0924903c_1cba_479d_882f_6c9c245c09c1 -->|calls| ff5020ca_11ae_230b_e44f_8630ed808405 style 0924903c_1cba_479d_882f_6c9c245c09c1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
binder/mapping.go lines 314–346
func equalFieldType(out any, kind reflect.Kind, key, aliasTag string) bool {
typ := reflect.TypeOf(out).Elem()
key = utils.ToLower(key)
if isStringKeyMap(typ) {
return true
}
if typ.Kind() != reflect.Struct {
return false
}
cache := getFieldCache(aliasTag)
val, ok := cache.Load(typ)
if !ok {
info := buildFieldInfo(typ, aliasTag)
val, _ = cache.LoadOrStore(typ, info)
}
info, ok := val.(fieldInfo)
if !ok {
return false
}
if k, ok := info.names[key]; ok && k == kind {
return true
}
if _, ok := info.nestedKinds[kind]; ok {
return true
}
return false
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does equalFieldType() do?
equalFieldType() is a function in the fiber codebase, defined in binder/mapping.go.
Where is equalFieldType() defined?
equalFieldType() is defined in binder/mapping.go at line 314.
What does equalFieldType() call?
equalFieldType() calls 3 function(s): buildFieldInfo, getFieldCache, isStringKeyMap.
What calls equalFieldType()?
equalFieldType() is called by 1 function(s): assignBindData.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free