MCPcopy
hub / github.com/grafana/dskit / Marshal

Method Marshal

ring/ring.pb.go:456–464  ·  ring/ring.pb.go::Desc.Marshal
()

Source from the content-addressed store, hash-verified

454 return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
455}
456func (m *Desc) Marshal() (dAtA []byte, err error) {
457 size := m.Size()
458 dAtA = make([]byte, size)
459 n, err := m.MarshalToSizedBuffer(dAtA[:size])
460 if err != nil {
461 return nil, err
462 }
463 return dAtA[:n], nil
464}
465
466func (m *Desc) MarshalTo(dAtA []byte) (int, error) {
467 size := m.Size()

Callers 15

TestTokens_SerializationFunction · 0.45
XXX_MarshalMethod · 0.45
XXX_MarshalMethod · 0.45
writeValueToFileFunction · 0.45
loadConfigMethod · 0.45
TestStringSliceCSVMultiFunction · 0.45
TestDayValueYAMLFunction · 0.45
TestURLValueYAMLFunction · 0.45
Test_Bytes_MarshalYAMLFunction · 0.45

Calls 2

SizeMethod · 0.95
MarshalToSizedBufferMethod · 0.95

Tested by 15

TestTokens_SerializationFunction · 0.36
writeValueToFileFunction · 0.36
TestStringSliceCSVMultiFunction · 0.36
TestDayValueYAMLFunction · 0.36
TestURLValueYAMLFunction · 0.36
Test_Bytes_MarshalYAMLFunction · 0.36
TestTimeYAMLFunction · 0.36
TestSecretdYAMLFunction · 0.36