Marshal returns the wire-format encoding of m.
(m Message)
| 20 | |
| 21 | // Marshal returns the wire-format encoding of m. |
| 22 | func 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 | |
| 30 | var zeroBytes = make([]byte, 0, 0) |
| 31 |