MCPcopy Create free account
hub / github.com/segmentio/encoding / mapCodecOf

Function mapCodecOf

proto/map.go:24–33  ·  view source on GitHub ↗
(t reflect.Type, f *mapField, seen map[reflect.Type]*codec)

Source from the content-addressed store, hash-verified

22}
23
24func mapCodecOf(t reflect.Type, f *mapField, seen map[reflect.Type]*codec) *codec {
25 m := new(codec)
26 seen[t] = m
27
28 m.wire = varlen
29 m.size = mapSizeFuncOf(t, f)
30 m.encode = mapEncodeFuncOf(t, f)
31 m.decode = mapDecodeFuncOf(t, f, seen)
32 return m
33}
34
35func mapSizeFuncOf(t reflect.Type, f *mapField) sizeFunc {
36 mapTagSize := sizeOfTag(fieldNumber(f.number), varlen)

Callers 1

structCodecOfFunction · 0.85

Calls 3

mapSizeFuncOfFunction · 0.85
mapEncodeFuncOfFunction · 0.85
mapDecodeFuncOfFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…