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

Function encodeFuncPtrOf

thrift/encode.go:388–401  ·  view source on GitHub ↗
(t reflect.Type, seen encodeFuncCache)

Source from the content-addressed store, hash-verified

386}
387
388func encodeFuncPtrOf(t reflect.Type, seen encodeFuncCache) encodeFunc {
389 typ := t.Elem()
390 enc := encodeFuncOf(typ, seen)
391 zero := reflect.Zero(typ)
392
393 return func(w Writer, v reflect.Value, f flags) error {
394 if v.IsNil() {
395 v = zero
396 } else {
397 v = v.Elem()
398 }
399 return enc(w, v, f)
400 }
401}

Callers 1

encodeFuncOfFunction · 0.85

Calls 2

encodeFuncOfFunction · 0.85
ElemMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…