MCPcopy
hub / github.com/golang/protobuf / Marshal

Function Marshal

proto/wire.go:22–28  ·  proto/wire.go::Marshal

Marshal returns the wire-format encoding of m.

(m Message)

Source from the content-addressed store, hash-verified

20
21// Marshal returns the wire-format encoding of m.
22func Marshal(m Message) ([]byte, error) {
23 b, err := marshalAppend(nil, m, false)
24 if b == nil {
25 b = zeroBytes
26 }
27 return b, err
28}
29
30var zeroBytes = make([]byte, 0, 0)
31

Callers 15

TestMarshalRaceFunction · 0.92
TestCloneFunction · 0.92
initFunction · 0.92
makeGoldenFunction · 0.92
newTestMessageFunction · 0.92
TestRacyMarshalFunction · 0.92
TestMarshalerEncodingFunction · 0.92

Calls 1

marshalAppendFunction · 0.85

Tested by 15

TestMarshalRaceFunction · 0.74
TestCloneFunction · 0.74
initFunction · 0.74
makeGoldenFunction · 0.74
newTestMessageFunction · 0.74
TestRacyMarshalFunction · 0.74
TestMarshalerEncodingFunction · 0.74