MCPcopy Index your code
hub / github.com/segmentio/encoding / constructMapDecodeFunc

Function constructMapDecodeFunc

json/codec.go:459–467  ·  view source on GitHub ↗
(t reflect.Type, decodeKey, decodeValue decodeFunc)

Source from the content-addressed store, hash-verified

457}
458
459func constructMapDecodeFunc(t reflect.Type, decodeKey, decodeValue decodeFunc) decodeFunc {
460 kt := t.Key()
461 vt := t.Elem()
462 kz := reflect.Zero(kt)
463 vz := reflect.Zero(vt)
464 return func(d decoder, b []byte, p unsafe.Pointer) ([]byte, error) {
465 return d.decodeMap(b, p, t, kt, vt, kz, vz, decodeKey, decodeValue)
466 }
467}
468
469func constructStructCodec(t reflect.Type, seen map[reflect.Type]*structType, canAddr bool) codec {
470 st := constructStructType(t, seen, canAddr)

Callers 1

constructMapCodecFunction · 0.85

Calls 3

decodeMapMethod · 0.80
KeyMethod · 0.65
ElemMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…