(tag string)
| 38 | ) |
| 39 | |
| 40 | func getDecoderPool(tag string) *sync.Pool { |
| 41 | decoderPoolMu.RLock() |
| 42 | pool := decoderPoolMap[tag] |
| 43 | if pool == nil { |
| 44 | decoderPoolMu.RUnlock() |
| 45 | panic(fmt.Sprintf("decoder pool not initialized for tag %q", tag)) |
| 46 | } |
| 47 | decoderPoolMu.RUnlock() |
| 48 | |
| 49 | return pool |
| 50 | } |
| 51 | |
| 52 | // SetParserDecoder allow globally change the option of form decoder, update decoderPool |
| 53 | func SetParserDecoder(parserConfig ParserConfig) { |
no outgoing calls