func (o *Remote) SetUrl(url string) error { curl := C.CString(url) defer C.free(unsafe.Pointer(curl)) runtime.LockOSThread() defer runtime.UnlockOSThread() ret := C.git_remote_set_url(o.ptr, curl) if ret < 0 { return MakeGitError(ret) } return nil }
func (c *RemoteCollection) SetUrl(remote, url string) error { curl := C.CString(url) defer C.free(unsafe.Pointer(curl)) cremote := C.CString(remote) defer C.free(unsafe.Pointer(cremote)) runtime.LockOSThread() defer runtime.UnlockOSThread() ret := C.git_remote_set_url(c.repo.ptr, cremote, curl) if ret < 0 { return MakeGitError(ret) } return nil }