()
| 335 | } |
| 336 | |
| 337 | func (s *RecordStream) ReadRecord() (*Record, error) { |
| 338 | for { |
| 339 | if s.index < 0 || s.index >= len(s.Records) { |
| 340 | return nil, io.EOF |
| 341 | } |
| 342 | |
| 343 | if _, isControl := s.Records[s.index].(*ControlBatch); isControl { |
| 344 | s.index++ |
| 345 | continue |
| 346 | } |
| 347 | |
| 348 | r, err := s.Records[s.index].ReadRecord() |
| 349 | if err != nil { |
| 350 | if errors.Is(err, io.EOF) { |
| 351 | s.index++ |
| 352 | continue |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | return r, err |
| 357 | } |
| 358 | } |
nothing calls this directly
no test coverage detected