MCPcopy
hub / github.com/gofiber/fiber / SetParserDecoder

Function SetParserDecoder

binder/mapping.go:53–62  ·  view source on GitHub ↗

SetParserDecoder allow globally change the option of form decoder, update decoderPool

(parserConfig ParserConfig)

Source from the content-addressed store, hash-verified

51
52// SetParserDecoder allow globally change the option of form decoder, update decoderPool
53func SetParserDecoder(parserConfig ParserConfig) {
54 decoderPoolMu.Lock()
55 defer decoderPoolMu.Unlock()
56
57 for _, tag := range tags {
58 decoderPoolMap[tag] = &sync.Pool{New: func() any {
59 return decoderBuilder(tag, parserConfig)
60 }}
61 }
62}
63
64func decoderBuilder(aliasTag string, parserConfig ParserConfig) any {
65 decoder := schema.NewDecoder()

Calls 3

decoderBuilderFunction · 0.85
LockMethod · 0.65
UnlockMethod · 0.65