(linePtr *LinePtr)
| 167 | } |
| 168 | |
| 169 | func (lv *LogView) LastLinePtr(linePtr *LinePtr) (*LinePtr, error) { |
| 170 | if linePtr == nil { |
| 171 | var err error |
| 172 | linePtr, err = lv.FirstLinePtr() |
| 173 | if err != nil { |
| 174 | return nil, err |
| 175 | } |
| 176 | } |
| 177 | if linePtr == nil { |
| 178 | return nil, nil |
| 179 | } |
| 180 | for { |
| 181 | nextLinePtr, err := lv.NextLinePtr(linePtr) |
| 182 | if err == io.EOF { |
| 183 | break |
| 184 | } |
| 185 | if err != nil { |
| 186 | return nil, err |
| 187 | } |
| 188 | if nextLinePtr == nil { |
| 189 | break |
| 190 | } |
| 191 | linePtr = nextLinePtr |
| 192 | } |
| 193 | return linePtr, nil |
| 194 | } |
| 195 | |
| 196 | func (lv *LogView) ReadWindow(linePtr *LinePtr, winSize int) ([][]byte, error) { |
| 197 | if linePtr == nil { |
nothing calls this directly
no test coverage detected