Decode value, which must be a *pb.Document, into dest.
(value *pb.Document, dest any)
| 120 | |
| 121 | // Decode value, which must be a *pb.Document, into dest. |
| 122 | func (c *nativeCodec) Decode(value *pb.Document, dest any) error { |
| 123 | c.doc = value |
| 124 | docsnap, err := c.client.Collection("C").Doc("D").Get(context.Background()) |
| 125 | if err != nil { |
| 126 | return err |
| 127 | } |
| 128 | return docsnap.DataTo(dest) |
| 129 | } |
| 130 | |
| 131 | func TestNativeCodec(t *testing.T) { |
| 132 | nc, err := newNativeCodec() |
no test coverage detected