(ctx context.Context)
| 136 | } |
| 137 | |
| 138 | func (it *docIterator) nextMap(ctx context.Context) (map[string]interface{}, error) { |
| 139 | if !it.cursor.Next(ctx) { |
| 140 | if it.cursor.Err() != nil { |
| 141 | return nil, it.cursor.Err() |
| 142 | } |
| 143 | return nil, io.EOF |
| 144 | } |
| 145 | var m map[string]interface{} |
| 146 | if err := it.cursor.Decode(&m); err != nil { |
| 147 | return nil, fmt.Errorf("cursor.Decode: %v", err) |
| 148 | } |
| 149 | return m, nil |
| 150 | } |
| 151 | |
| 152 | func (it *docIterator) Stop() { |
| 153 | // Ignore error on Close. |