Next returns the next entry for this iterator
()
| 369 | |
| 370 | // Next returns the next entry for this iterator |
| 371 | func (iter *ConfigIterator) Next() (*ConfigEntry, error) { |
| 372 | var centry *C.git_config_entry |
| 373 | |
| 374 | runtime.LockOSThread() |
| 375 | defer runtime.UnlockOSThread() |
| 376 | |
| 377 | ret := C.git_config_next(¢ry, iter.ptr) |
| 378 | if ret < 0 { |
| 379 | return nil, MakeGitError(ret) |
| 380 | } |
| 381 | |
| 382 | entry := newConfigEntryFromC(centry) |
| 383 | runtime.KeepAlive(iter) |
| 384 | |
| 385 | return entry, nil |
| 386 | } |
| 387 | |
| 388 | func (iter *ConfigIterator) Free() { |
| 389 | runtime.SetFinalizer(iter, nil) |
nothing calls this directly
no test coverage detected