{"action":"created","comment":{"url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/pulls/comments/83346067","pull_request_review_id":4196584,"id":83346067,"diff_hunk":"@@ -21,8 +21,15 @@ func (r *Ring) search(key string) int {\n     /////////////////////////\n     // YOUR CODE GOES HERE //\n     /////////////////////////\n-\n-    return 0\n+\tr.Lock()\n+\tdefer r.Unlock()\n+\t\n+\tkey_hash := hashId(key)\n+\tvar i = 0\n+\tfor i < r.Nodes.Len() && key_hash >= r.Nodes[i].HashId {","path":"common/consistenthash/consistenthash.go","position":11,"original_position":11,"commit_id":"5263fc1ab748475c5ea4041b70a73801619b6115","original_commit_id":"5263fc1ab748475c5ea4041b70a73801619b6115","user":{"login":"PauloAguiar","id":1757521,"avatar_url":"https://avatars.githubusercontent.com/u/1757521?v=3","gravatar_id":"","url":"https://api.github.com/users/PauloAguiar","html_url":"https://github.com/PauloAguiar","followers_url":"https://api.github.com/users/PauloAguiar/followers","following_url":"https://api.github.com/users/PauloAguiar/following{/other_user}","gists_url":"https://api.github.com/users/PauloAguiar/gists{/gist_id}","starred_url":"https://api.github.com/users/PauloAguiar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PauloAguiar/subscriptions","organizations_url":"https://api.github.com/users/PauloAguiar/orgs","repos_url":"https://api.github.com/users/PauloAguiar/repos","events_url":"https://api.github.com/users/PauloAguiar/events{/privacy}","received_events_url":"https://api.github.com/users/PauloAguiar/received_events","type":"User","site_admin":false},"body":"E se não houver na array um elemento que atenda à condição?","created_at":"2016-10-14T01:38:13Z","updated_at":"2016-10-14T01:38:47Z","html_url":"https://github.com/PauloAguiar/ces27-lab2/pull/8#discussion_r83346067","pull_request_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab2/pulls/comments/83346067"},"html":{"href":"https://github.com/PauloAguiar/ces27-lab2/pull/8#discussion_r83346067"},"pull_request":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab2/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/pulls/8","id":89198620,"html_url":"https://github.com/PauloAguiar/ces27-lab2/pull/8","diff_url":"https://github.com/PauloAguiar/ces27-lab2/pull/8.diff","patch_url":"https://github.com/PauloAguiar/ces27-lab2/pull/8.patch","issue_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/issues/8","number":8,"state":"open","locked":false,"title":"lab2","user":{"login":"caiquelira","id":3820129,"avatar_url":"https://avatars.githubusercontent.com/u/3820129?v=3","gravatar_id":"","url":"https://api.github.com/users/caiquelira","html_url":"https://github.com/caiquelira","followers_url":"https://api.github.com/users/caiquelira/followers","following_url":"https://api.github.com/users/caiquelira/following{/other_user}","gists_url":"https://api.github.com/users/caiquelira/gists{/gist_id}","starred_url":"https://api.github.com/users/caiquelira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caiquelira/subscriptions","organizations_url":"https://api.github.com/users/caiquelira/orgs","repos_url":"https://api.github.com/users/caiquelira/repos","events_url":"https://api.github.com/users/caiquelira/events{/privacy}","received_events_url":"https://api.github.com/users/caiquelira/received_events","type":"User","site_admin":false},"body":"Caique Porto Lira\r\nCES27 lab2","created_at":"2016-10-13T13:09:22Z","updated_at":"2016-10-14T01:38:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03c91503879b297c9da7e35c553822c86cbc837b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/pulls/8/commits","review_comments_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/pulls/8/comments","review_comment_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/issues/8/comments","statuses_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/statuses/5263fc1ab748475c5ea4041b70a73801619b6115","head":{"label":"caiquelira:master","ref":"master","sha":"5263fc1ab748475c5ea4041b70a73801619b6115","user":{"login":"caiquelira","id":3820129,"avatar_url":"https://avatars.githubusercontent.com/u/3820129?v=3","gravatar_id":"","url":"https://api.github.com/users/caiquelira","html_url":"https://github.com/caiquelira","followers_url":"https://api.github.com/users/caiquelira/followers","following_url":"https://api.github.com/users/caiquelira/following{/other_user}","gists_url":"https://api.github.com/users/caiquelira/gists{/gist_id}","starred_url":"https://api.github.com/users/caiquelira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caiquelira/subscriptions","organizations_url":"https://api.github.com/users/caiquelira/orgs","repos_url":"https://api.github.com/users/caiquelira/repos","events_url":"https://api.github.com/users/caiquelira/events{/privacy}","received_events_url":"https://api.github.com/users/caiquelira/received_events","type":"User","site_admin":false},"repo":{"id":70807404,"name":"ces27-lab2","full_name":"caiquelira/ces27-lab2","owner":{"login":"caiquelira","id":3820129,"avatar_url":"https://avatars.githubusercontent.com/u/3820129?v=3","gravatar_id":"","url":"https://api.github.com/users/caiquelira","html_url":"https://github.com/caiquelira","followers_url":"https://api.github.com/users/caiquelira/followers","following_url":"https://api.github.com/users/caiquelira/following{/other_user}","gists_url":"https://api.github.com/users/caiquelira/gists{/gist_id}","starred_url":"https://api.github.com/users/caiquelira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caiquelira/subscriptions","organizations_url":"https://api.github.com/users/caiquelira/orgs","repos_url":"https://api.github.com/users/caiquelira/repos","events_url":"https://api.github.com/users/caiquelira/events{/privacy}","received_events_url":"https://api.github.com/users/caiquelira/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/caiquelira/ces27-lab2","description":"CES27 - Distributed Systems - Course Assignment #2","fork":true,"url":"https://api.github.com/repos/caiquelira/ces27-lab2","forks_url":"https://api.github.com/repos/caiquelira/ces27-lab2/forks","keys_url":"https://api.github.com/repos/caiquelira/ces27-lab2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caiquelira/ces27-lab2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caiquelira/ces27-lab2/teams","hooks_url":"https://api.github.com/repos/caiquelira/ces27-lab2/hooks","issue_events_url":"https://api.github.com/repos/caiquelira/ces27-lab2/issues/events{/number}","events_url":"https://api.github.com/repos/caiquelira/ces27-lab2/events","assignees_url":"https://api.github.com/repos/caiquelira/ces27-lab2/assignees{/user}","branches_url":"https://api.github.com/repos/caiquelira/ces27-lab2/branches{/branch}","tags_url":"https://api.github.com/repos/caiquelira/ces27-lab2/tags","blobs_url":"https://api.github.com/repos/caiquelira/ces27-lab2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caiquelira/ces27-lab2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caiquelira/ces27-lab2/git/refs{/sha}","trees_url":"https://api.github.com/repos/caiquelira/ces27-lab2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caiquelira/ces27-lab2/statuses/{sha}","languages_url":"https://api.github.com/repos/caiquelira/ces27-lab2/languages","stargazers_url":"https://api.github.com/repos/caiquelira/ces27-lab2/stargazers","contributors_url":"https://api.github.com/repos/caiquelira/ces27-lab2/contributors","subscribers_url":"https://api.github.com/repos/caiquelira/ces27-lab2/subscribers","subscription_url":"https://api.github.com/repos/caiquelira/ces27-lab2/subscription","commits_url":"https://api.github.com/repos/caiquelira/ces27-lab2/commits{/sha}","git_commits_url":"https://api.github.com/repos/caiquelira/ces27-lab2/git/commits{/sha}","comments_url":"https://api.github.com/repos/caiquelira/ces27-lab2/comments{/number}","issue_comment_url":"https://api.github.com/repos/caiquelira/ces27-lab2/issues/comments{/number}","contents_url":"https://api.github.com/repos/caiquelira/ces27-lab2/contents/{+path}","compare_url":"https://api.github.com/repos/caiquelira/ces27-lab2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caiquelira/ces27-lab2/merges","archive_url":"https://api.github.com/repos/caiquelira/ces27-lab2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caiquelira/ces27-lab2/downloads","issues_url":"https://api.github.com/repos/caiquelira/ces27-lab2/issues{/number}","pulls_url":"https://api.github.com/repos/caiquelira/ces27-lab2/pulls{/number}","milestones_url":"https://api.github.com/repos/caiquelira/ces27-lab2/milestones{/number}","notifications_url":"https://api.github.com/repos/caiquelira/ces27-lab2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caiquelira/ces27-lab2/labels{/name}","releases_url":"https://api.github.com/repos/caiquelira/ces27-lab2/releases{/id}","deployments_url":"https://api.github.com/repos/caiquelira/ces27-lab2/deployments","created_at":"2016-10-13T13:07:18Z","updated_at":"2016-10-13T13:07:19Z","pushed_at":"2016-10-13T13:07:49Z","git_url":"git://github.com/caiquelira/ces27-lab2.git","ssh_url":"git@github.com:caiquelira/ces27-lab2.git","clone_url":"https://github.com/caiquelira/ces27-lab2.git","svn_url":"https://github.com/caiquelira/ces27-lab2","homepage":null,"size":285,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PauloAguiar:master","ref":"master","sha":"ac5699e41e41dca529fe66444c2604c8a7849366","user":{"login":"PauloAguiar","id":1757521,"avatar_url":"https://avatars.githubusercontent.com/u/1757521?v=3","gravatar_id":"","url":"https://api.github.com/users/PauloAguiar","html_url":"https://github.com/PauloAguiar","followers_url":"https://api.github.com/users/PauloAguiar/followers","following_url":"https://api.github.com/users/PauloAguiar/following{/other_user}","gists_url":"https://api.github.com/users/PauloAguiar/gists{/gist_id}","starred_url":"https://api.github.com/users/PauloAguiar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PauloAguiar/subscriptions","organizations_url":"https://api.github.com/users/PauloAguiar/orgs","repos_url":"https://api.github.com/users/PauloAguiar/repos","events_url":"https://api.github.com/users/PauloAguiar/events{/privacy}","received_events_url":"https://api.github.com/users/PauloAguiar/received_events","type":"User","site_admin":false},"repo":{"id":70152295,"name":"ces27-lab2","full_name":"PauloAguiar/ces27-lab2","owner":{"login":"PauloAguiar","id":1757521,"avatar_url":"https://avatars.githubusercontent.com/u/1757521?v=3","gravatar_id":"","url":"https://api.github.com/users/PauloAguiar","html_url":"https://github.com/PauloAguiar","followers_url":"https://api.github.com/users/PauloAguiar/followers","following_url":"https://api.github.com/users/PauloAguiar/following{/other_user}","gists_url":"https://api.github.com/users/PauloAguiar/gists{/gist_id}","starred_url":"https://api.github.com/users/PauloAguiar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PauloAguiar/subscriptions","organizations_url":"https://api.github.com/users/PauloAguiar/orgs","repos_url":"https://api.github.com/users/PauloAguiar/repos","events_url":"https://api.github.com/users/PauloAguiar/events{/privacy}","received_events_url":"https://api.github.com/users/PauloAguiar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PauloAguiar/ces27-lab2","description":"CES27 - Distributed Systems - Course Assignment #2","fork":false,"url":"https://api.github.com/repos/PauloAguiar/ces27-lab2","forks_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/forks","keys_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/teams","hooks_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/hooks","issue_events_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/issues/events{/number}","events_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/events","assignees_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/assignees{/user}","branches_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/branches{/branch}","tags_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/tags","blobs_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/git/refs{/sha}","trees_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/statuses/{sha}","languages_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/languages","stargazers_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/stargazers","contributors_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/contributors","subscribers_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/subscribers","subscription_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/subscription","commits_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/commits{/sha}","git_commits_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/git/commits{/sha}","comments_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/comments{/number}","issue_comment_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/issues/comments{/number}","contents_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/contents/{+path}","compare_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/merges","archive_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/downloads","issues_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/issues{/number}","pulls_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/pulls{/number}","milestones_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/milestones{/number}","notifications_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/labels{/name}","releases_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/releases{/id}","deployments_url":"https://api.github.com/repos/PauloAguiar/ces27-lab2/deployments","created_at":"2016-10-06T12:35:03Z","updated_at":"2016-10-06T12:36:07Z","pushed_at":"2016-10-13T19:46:09Z","git_url":"git://github.com/PauloAguiar/ces27-lab2.git","ssh_url":"git@github.com:PauloAguiar/ces27-lab2.git","clone_url":"https://github.com/PauloAguiar/ces27-lab2.git","svn_url":"https://github.com/PauloAguiar/ces27-lab2","homepage":null,"size":286,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":8,"forks":10,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab2/pulls/8"},"html":{"href":"https://github.com/PauloAguiar/ces27-lab2/pull/8"},"issue":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab2/issues/8"},"comments":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab2/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab2/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab2/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab2/statuses/5263fc1ab748475c5ea4041b70a73801619b6115"}}}}
{"actor":{"display_login":"PauloAguiar"}}