MarshalTo behaves like Marshal, except that it deserializes to an existing byte slice and returns the number of bytes written to it. The slice must already have sufficient capacity. Callers can use the Size method to determine how much capacity needs to be allocated. Marshal is part of the protouti
(data []byte)
| 1791 | // |
| 1792 | // Marshal is part of the protoutil.Message interface. |
| 1793 | func (t *T) MarshalTo(data []byte) (int, error) { |
| 1794 | temp := *t |
| 1795 | if err := temp.downgradeType(); err != nil { |
| 1796 | return 0, err |
| 1797 | } |
| 1798 | return temp.InternalType.MarshalTo(data) |
| 1799 | } |
| 1800 | |
| 1801 | // of the latest CRDB version. It updates the fields so that they will be |
| 1802 | // marshaled into a format that is compatible with the previous version of |
nothing calls this directly
no test coverage detected