Next returns the current item (note id & annotated id) and advances the iterator internally to the next item
()
| 231 | // Next returns the current item (note id & annotated id) and advances the |
| 232 | // iterator internally to the next item |
| 233 | func (it *NoteIterator) Next() (noteId, annotatedId *Oid, err error) { |
| 234 | noteId, annotatedId = new(Oid), new(Oid) |
| 235 | |
| 236 | runtime.LockOSThread() |
| 237 | defer runtime.UnlockOSThread() |
| 238 | |
| 239 | ret := C.git_note_next(noteId.toC(), annotatedId.toC(), it.ptr) |
| 240 | runtime.KeepAlive(noteId) |
| 241 | runtime.KeepAlive(annotatedId) |
| 242 | runtime.KeepAlive(it) |
| 243 | if ret < 0 { |
| 244 | err = MakeGitError(ret) |
| 245 | } |
| 246 | return |
| 247 | } |