MCPcopy
hub / github.com/uptrace/uptrace / createMapEncodeFunc

Function createMapEncodeFunc

pkg/msgp/codec.go:278–282  ·  view source on GitHub ↗
(t reflect.Type, encodeKey, encodeValue encodeFunc, sortKeys sortFunc)

Source from the content-addressed store, hash-verified

276 return Codec{encode: createMapEncodeFunc(t, kc.encode, vc.encode, sortKeys), decode: createMapDecodeFunc(t, kc.decode, vc.decode)}
277}
278func createMapEncodeFunc(t reflect.Type, encodeKey, encodeValue encodeFunc, sortKeys sortFunc) encodeFunc {
279 return func(e encoder, b []byte, p unsafe.Pointer) ([]byte, error) {
280 return e.encodeMap(b, p, t, encodeKey, encodeValue, sortKeys)
281 }
282}
283func createMapDecodeFunc(t reflect.Type, decodeKey, decodeValue decodeFunc) decodeFunc {
284 kt := t.Key()
285 vt := t.Elem()

Callers 1

createMapCodecFunction · 0.85

Calls 1

encodeMapMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…