Пример #1
0
func (repo *Repository) ForeachSubmodule(cbk SubmoduleCbk) error {
	ret := C._go_git_visit_submodule(repo.ptr, unsafe.Pointer(&cbk))
	if ret < 0 {
		return LastError()
	}
	return nil
}
Пример #2
0
func (repo *Repository) ForeachSubmodule(cbk SubmoduleCbk) error {
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	ret := C._go_git_visit_submodule(repo.ptr, unsafe.Pointer(&cbk))
	if ret < 0 {
		return MakeGitError(ret)
	}
	return nil
}
Пример #3
0
func (c *SubmoduleCollection) Foreach(cbk SubmoduleCbk) error {
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	handle := pointerHandles.Track(cbk)
	defer pointerHandles.Untrack(handle)

	ret := C._go_git_visit_submodule(c.repo.ptr, handle)
	if ret < 0 {
		return MakeGitError(ret)
	}
	return nil
}