NewDecoder returns a new gob Decoder for the given io.Reader.
(rd io.Reader)
| 143 | |
| 144 | // NewDecoder returns a new gob Decoder for the given io.Reader. |
| 145 | func NewDecoder(rd io.Reader) Decoder { |
| 146 | dec := gob.NewDecoder(rd) |
| 147 | return func(r *Result) error { return dec.Decode(r) } |
| 148 | } |
| 149 | |
| 150 | // Decode is an an adapter method calling the Decoder function itself with the |
| 151 | // given parameters. |