(i int, r *Record, f func(int, *Record) error)
| 65 | } |
| 66 | |
| 67 | func handleRecord(i int, r *Record, f func(int, *Record) error) error { |
| 68 | if r.Key != nil { |
| 69 | defer r.Key.Close() |
| 70 | } |
| 71 | if r.Value != nil { |
| 72 | defer r.Value.Close() |
| 73 | } |
| 74 | return f(i, r) |
| 75 | } |
| 76 | |
| 77 | type recordReader struct { |
| 78 | records []Record |