(key []byte)
| 791 | } |
| 792 | |
| 793 | func (tl *threadLocal) toBackupKey(key []byte) ([]byte, error) { |
| 794 | parsedKey, err := x.Parse(key) |
| 795 | if err != nil { |
| 796 | return nil, errors.Wrapf(err, "could not parse key %s", hex.Dump(key)) |
| 797 | } |
| 798 | bk := parsedKey.ToBackupKey() |
| 799 | |
| 800 | out := tl.alloc.Allocate(proto.Size(bk)) |
| 801 | return x.MarshalToSizedBuffer(out, bk) |
| 802 | } |
| 803 | |
| 804 | func writeKVList(list *bpb.KVList, w io.Writer) error { |
| 805 | if err := binary.Write(w, binary.LittleEndian, uint64(proto.Size(list))); err != nil { |
no test coverage detected