Unmarshal deserializes a type from the given byte representation using gogo protobuf serialization rules. It is backwards-compatible with formats used by older versions of CRDB. var t T err := protoutil.Unmarshal(data, &t) Unmarshal is part of the protoutil.Message interface.
(data []byte)
| 1563 | // |
| 1564 | // Unmarshal is part of the protoutil.Message interface. |
| 1565 | func (t *T) Unmarshal(data []byte) error { |
| 1566 | // Unmarshal the internal type, and then perform an upgrade step to convert |
| 1567 | // to the latest format. |
| 1568 | err := protoutil.Unmarshal(data, &t.InternalType) |
| 1569 | if err != nil { |
| 1570 | return err |
| 1571 | } |
| 1572 | return t.upgradeType() |
| 1573 | } |
| 1574 | |
| 1575 | // upgradeType assumes its input was just unmarshaled from bytes that may have |
| 1576 | // been serialized by any previous version of CRDB. It upgrades the object |
nothing calls this directly
no test coverage detected