(offset int64)
| 92 | } |
| 93 | |
| 94 | func (mb *MultiBufferByteGetter) NextLine(offset int64) (int64, error) { |
| 95 | for { |
| 96 | b, err := mb.GetByte(offset) |
| 97 | if err != nil { |
| 98 | return 0, err |
| 99 | } |
| 100 | if b == '\n' { |
| 101 | break |
| 102 | } |
| 103 | offset++ |
| 104 | } |
| 105 | _, lastErr := mb.GetByte(offset + 1) |
| 106 | if lastErr == io.EOF { |
| 107 | return 0, io.EOF |
| 108 | } |
| 109 | return offset + 1, nil |
| 110 | } |
| 111 | |
| 112 | func (mb *MultiBufferByteGetter) PrevLine(offset int64) (int64, error) { |
| 113 | if offset == 0 { |