Home / Function/ parse() — fiber Function Reference

parse() — fiber Function Reference

Architecture documentation for the parse() function in mapping.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  ed7cfcc6_c354_02e5_2860_6f84d4b42410["parse()"]
  5a1aea01_8a49_a350_626b_5da5e78187fd["mapping.go"]
  ed7cfcc6_c354_02e5_2860_6f84d4b42410 -->|defined in| 5a1aea01_8a49_a350_626b_5da5e78187fd
  e3d28b2d_690a_91ab_0f86_f6fe9bc17027["parseToMap()"]
  ed7cfcc6_c354_02e5_2860_6f84d4b42410 -->|calls| e3d28b2d_690a_91ab_0f86_f6fe9bc17027
  ec3e0abf_04f6_4fac_1d98_6e382ea64f69["parseToStruct()"]
  ed7cfcc6_c354_02e5_2860_6f84d4b42410 -->|calls| ec3e0abf_04f6_4fac_1d98_6e382ea64f69
  style ed7cfcc6_c354_02e5_2860_6f84d4b42410 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

binder/mapping.go lines 92–107

func parse(aliasTag string, out any, data map[string][]string, files ...map[string][]*multipart.FileHeader) error {
	ptrVal := reflect.ValueOf(out)

	// Get pointer value
	if ptrVal.Kind() == reflect.Ptr {
		ptrVal = ptrVal.Elem()
	}

	// Parse into the map
	if ptrVal.Kind() == reflect.Map && ptrVal.Type().Key().Kind() == reflect.String {
		return parseToMap(ptrVal, data)
	}

	// Parse into the struct
	return parseToStruct(aliasTag, out, data, files...)
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does parse() do?
parse() is a function in the fiber codebase, defined in binder/mapping.go.
Where is parse() defined?
parse() is defined in binder/mapping.go at line 92.
What does parse() call?
parse() calls 2 function(s): parseToMap, parseToStruct.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free