Пример #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
}
Пример #2
0
// 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
}