MCPcopy Create free account
hub / github.com/libgit2/git2go / Next

Method Next

config.go:371–386  ·  view source on GitHub ↗

Next returns the next entry for this iterator

()

Source from the content-addressed store, hash-verified

369
370// Next returns the next entry for this iterator
371func (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(&centry, 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
388func (iter *ConfigIterator) Free() {
389 runtime.SetFinalizer(iter, nil)

Callers

nothing calls this directly

Calls 2

MakeGitErrorFunction · 0.85
newConfigEntryFromCFunction · 0.85

Tested by

no test coverage detected