Example #1
0
// Next returns the next entry for this iterator
func (iter *ConfigIterator) Next() (*ConfigEntry, error) {
	var centry *C.git_config_entry

	ret := C.git_config_next(&centry, iter.ptr)
	if ret < 0 {
		return nil, MakeGitError(ret)
	}

	return newConfigEntryFromC(centry), nil
}
Example #2
0
File: config.go Project: wid/git2go
// Next returns the next entry for this iterator
func (iter *ConfigIterator) Next() (*ConfigEntry, error) {
	var centry *C.git_config_entry

	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	ret := C.git_config_next(&centry, iter.ptr)
	if ret < 0 {
		return nil, MakeGitError(ret)
	}

	return newConfigEntryFromC(centry), nil
}