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

Function newValue

json/json_test.go:626–631  ·  view source on GitHub ↗
(model any)

Source from the content-addressed store, hash-verified

624}
625
626func newValue(model any) reflect.Value {
627 if model == nil {
628 return reflect.New(reflect.TypeOf(&model).Elem())
629 }
630 return reflect.New(reflect.TypeOf(model))
631}
632
633func BenchmarkMarshal(b *testing.B) {
634 j := make([]byte, 0, 128*1024)

Callers 3

TestCodecFunction · 0.85
TestCodecDurationFunction · 0.85
BenchmarkUnmarshalFunction · 0.85

Calls 1

ElemMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…