{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/31481345","id":31481345,"diff_hunk":"@@ -184,6 +192,10 @@ func (proxier *Proxier) stopProxy(service ServicePortName, info *serviceInfo) er\n \n // This assumes proxier.mu is locked.\n func (proxier *Proxier) stopProxyInternal(service ServicePortName, info *serviceInfo) error {\n+\tdefer func() {","path":"pkg/proxy/proxier.go","position":49,"original_position":49,"commit_id":"8b124ec60cab1710f8b5bf0ba5a13fe365916672","original_commit_id":"49e88fc05357642bce9483532455561692a8262f","user":{"login":"jdef","id":2348332,"avatar_url":"https://avatars.githubusercontent.com/u/2348332?v=3","gravatar_id":"","url":"https://api.github.com/users/jdef","html_url":"https://github.com/jdef","followers_url":"https://api.github.com/users/jdef/followers","following_url":"https://api.github.com/users/jdef/following{/other_user}","gists_url":"https://api.github.com/users/jdef/gists{/gist_id}","starred_url":"https://api.github.com/users/jdef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdef/subscriptions","organizations_url":"https://api.github.com/users/jdef/orgs","repos_url":"https://api.github.com/users/jdef/repos","events_url":"https://api.github.com/users/jdef/events{/privacy}","received_events_url":"https://api.github.com/users/jdef/received_events","type":"User","site_admin":false},"body":"At the time I was thinking along the lines of a \"finally\" clause. Probably\ndoesn't matter here though. I'll make it linear.\n\nOn Mon, Jun 1, 2015 at 4:43 PM, Tim Hockin <notifications@github.com> wrote:\n\n> In pkg/proxy/proxier.go\n> <https://github.com/GoogleCloudPlatform/kubernetes/pull/8417#discussion_r31468039>\n> :\n>\n> > @@ -184,6 +192,10 @@ func (proxier *Proxier) stopProxy(service ServicePortName, info *serviceInfo) er\n> >\n> >  // This assumes proxier.mu is locked.\n> >  func (proxier *Proxier) stopProxyInternal(service ServicePortName, info *serviceInfo) error {\n> > +\tdefer func() {\n>\n> Why do this by defer rather than just linear code?\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/GoogleCloudPlatform/kubernetes/pull/8417/files#r31468039>\n> .\n>\n","created_at":"2015-06-01T23:27:06Z","updated_at":"2015-06-01T23:27:06Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8417#discussion_r31481345","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8417","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/31481345"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8417#discussion_r31481345"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8417"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8417","id":35654285,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8417","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8417.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8417.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/8417","number":8417,"state":"open","locked":false,"title":"proxy port range allocation","user":{"login":"jdef","id":2348332,"avatar_url":"https://avatars.githubusercontent.com/u/2348332?v=3","gravatar_id":"","url":"https://api.github.com/users/jdef","html_url":"https://github.com/jdef","followers_url":"https://api.github.com/users/jdef/followers","following_url":"https://api.github.com/users/jdef/following{/other_user}","gists_url":"https://api.github.com/users/jdef/gists{/gist_id}","starred_url":"https://api.github.com/users/jdef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdef/subscriptions","organizations_url":"https://api.github.com/users/jdef/orgs","repos_url":"https://api.github.com/users/jdef/repos","events_url":"https://api.github.com/users/jdef/events{/privacy}","received_events_url":"https://api.github.com/users/jdef/received_events","type":"User","site_admin":false},"body":"implements changes proposed in #7846\r\n\r\n/cc @thockin ","created_at":"2015-05-18T17:14:57Z","updated_at":"2015-06-01T23:27:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"beb2dce71e6c4dea72e05e67324b999dff94498e","assignee":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8417/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8417/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/8417/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/8b124ec60cab1710f8b5bf0ba5a13fe365916672","head":{"label":"jdef:proxy_port_allocator","ref":"proxy_port_allocator","sha":"8b124ec60cab1710f8b5bf0ba5a13fe365916672","user":{"login":"jdef","id":2348332,"avatar_url":"https://avatars.githubusercontent.com/u/2348332?v=3","gravatar_id":"","url":"https://api.github.com/users/jdef","html_url":"https://github.com/jdef","followers_url":"https://api.github.com/users/jdef/followers","following_url":"https://api.github.com/users/jdef/following{/other_user}","gists_url":"https://api.github.com/users/jdef/gists{/gist_id}","starred_url":"https://api.github.com/users/jdef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdef/subscriptions","organizations_url":"https://api.github.com/users/jdef/orgs","repos_url":"https://api.github.com/users/jdef/repos","events_url":"https://api.github.com/users/jdef/events{/privacy}","received_events_url":"https://api.github.com/users/jdef/received_events","type":"User","site_admin":false},"repo":{"id":27609087,"name":"kubernetes","full_name":"jdef/kubernetes","owner":{"login":"jdef","id":2348332,"avatar_url":"https://avatars.githubusercontent.com/u/2348332?v=3","gravatar_id":"","url":"https://api.github.com/users/jdef","html_url":"https://github.com/jdef","followers_url":"https://api.github.com/users/jdef/followers","following_url":"https://api.github.com/users/jdef/following{/other_user}","gists_url":"https://api.github.com/users/jdef/gists{/gist_id}","starred_url":"https://api.github.com/users/jdef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdef/subscriptions","organizations_url":"https://api.github.com/users/jdef/orgs","repos_url":"https://api.github.com/users/jdef/repos","events_url":"https://api.github.com/users/jdef/events{/privacy}","received_events_url":"https://api.github.com/users/jdef/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jdef/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/jdef/kubernetes","forks_url":"https://api.github.com/repos/jdef/kubernetes/forks","keys_url":"https://api.github.com/repos/jdef/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jdef/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jdef/kubernetes/teams","hooks_url":"https://api.github.com/repos/jdef/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/jdef/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/jdef/kubernetes/events","assignees_url":"https://api.github.com/repos/jdef/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/jdef/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/jdef/kubernetes/tags","blobs_url":"https://api.github.com/repos/jdef/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jdef/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jdef/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/jdef/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jdef/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/jdef/kubernetes/languages","stargazers_url":"https://api.github.com/repos/jdef/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/jdef/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/jdef/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/jdef/kubernetes/subscription","commits_url":"https://api.github.com/repos/jdef/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/jdef/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/jdef/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/jdef/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/jdef/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/jdef/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jdef/kubernetes/merges","archive_url":"https://api.github.com/repos/jdef/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jdef/kubernetes/downloads","issues_url":"https://api.github.com/repos/jdef/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/jdef/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/jdef/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/jdef/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jdef/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/jdef/kubernetes/releases{/id}","created_at":"2014-12-05T20:36:40Z","updated_at":"2015-04-06T18:14:52Z","pushed_at":"2015-06-01T23:22:09Z","git_url":"git://github.com/jdef/kubernetes.git","ssh_url":"git@github.com:jdef/kubernetes.git","clone_url":"https://github.com/jdef/kubernetes.git","svn_url":"https://github.com/jdef/kubernetes","homepage":null,"size":58696,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"497f99ff85bcf422ae46de754697d9bd17b0baa4","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-06-01T20:41:25Z","pushed_at":"2015-06-01T23:24:10Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":300955,"stargazers_count":8012,"watchers_count":8012,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1693,"mirror_url":null,"open_issues_count":1235,"forks":1693,"open_issues":1235,"watchers":8012,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8417"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8417"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/8417"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/8417/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8417/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8417/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/8b124ec60cab1710f8b5bf0ba5a13fe365916672"}}}}