{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/contrib/pulls/comments/54769507","id":54769507,"diff_hunk":"@@ -88,8 +90,16 @@ func main() {\n \t\t\tlog.Printf(\"HTTP request from %s\", r.RemoteAddr)\n \t\t\tfmt.Fprintf(w, \"%s\", hostname)\n \t\t})\n-\t\tgo log.Fatal(http.ListenAndServe(fmt.Sprintf(\":%d\", *port), nil))\n+\t\tgo func() {\n+\t\t\tlog.Fatal(http.ListenAndServe(fmt.Sprintf(\":%d\", *port), nil))\n+\t\t}()\n \t}\n \n-\tselect {}\n+\t// Write to stdout after receiving SIGTERM\n+\tsignals := make(chan os.Signal)\n+\tsignal.Notify(signals, syscall.SIGTERM)\n+\tselect {\n+\tcase sig := <- signals:\n+\t\tlog.Panicf(\"Terminating after receiving signal: %s.\\n\", sig.String())","path":"for-demos/serve_hostname/serve_hostname.go","position":25,"original_position":25,"commit_id":"f45ff45a2d5c2d3414b0d5750452cf9211c06b31","original_commit_id":"f45ff45a2d5c2d3414b0d5750452cf9211c06b31","user":{"login":"bprashanth","id":10927820,"avatar_url":"https://avatars.githubusercontent.com/u/10927820?v=3","gravatar_id":"","url":"https://api.github.com/users/bprashanth","html_url":"https://github.com/bprashanth","followers_url":"https://api.github.com/users/bprashanth/followers","following_url":"https://api.github.com/users/bprashanth/following{/other_user}","gists_url":"https://api.github.com/users/bprashanth/gists{/gist_id}","starred_url":"https://api.github.com/users/bprashanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bprashanth/subscriptions","organizations_url":"https://api.github.com/users/bprashanth/orgs","repos_url":"https://api.github.com/users/bprashanth/repos","events_url":"https://api.github.com/users/bprashanth/events{/privacy}","received_events_url":"https://api.github.com/users/bprashanth/received_events","type":"User","site_admin":false},"body":"Do you need to invoke String() or will %s do that for you?","created_at":"2016-03-02T18:42:43Z","updated_at":"2016-03-02T18:42:43Z","html_url":"https://github.com/kubernetes/contrib/pull/529#discussion_r54769507","pull_request_url":"https://api.github.com/repos/kubernetes/contrib/pulls/529","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/comments/54769507"},"html":{"href":"https://github.com/kubernetes/contrib/pull/529#discussion_r54769507"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/529"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/contrib/pulls/529","id":61444604,"html_url":"https://github.com/kubernetes/contrib/pull/529","diff_url":"https://github.com/kubernetes/contrib/pull/529.diff","patch_url":"https://github.com/kubernetes/contrib/pull/529.patch","issue_url":"https://api.github.com/repos/kubernetes/contrib/issues/529","number":529,"state":"open","locked":false,"title":"serve_hostname debug logging after receiving SIGTERM","user":{"login":"pwittrock","id":7882754,"avatar_url":"https://avatars.githubusercontent.com/u/7882754?v=3","gravatar_id":"","url":"https://api.github.com/users/pwittrock","html_url":"https://github.com/pwittrock","followers_url":"https://api.github.com/users/pwittrock/followers","following_url":"https://api.github.com/users/pwittrock/following{/other_user}","gists_url":"https://api.github.com/users/pwittrock/gists{/gist_id}","starred_url":"https://api.github.com/users/pwittrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwittrock/subscriptions","organizations_url":"https://api.github.com/users/pwittrock/orgs","repos_url":"https://api.github.com/users/pwittrock/repos","events_url":"https://api.github.com/users/pwittrock/events{/privacy}","received_events_url":"https://api.github.com/users/pwittrock/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-02T18:28:02Z","updated_at":"2016-03-02T18:42:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fb9ea3e4991c6bc7e251eb6c580feda33743743d","assignee":{"login":"mikedanese","id":1787169,"avatar_url":"https://avatars.githubusercontent.com/u/1787169?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/contrib/pulls/529/commits","review_comments_url":"https://api.github.com/repos/kubernetes/contrib/pulls/529/comments","review_comment_url":"https://api.github.com/repos/kubernetes/contrib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/contrib/issues/529/comments","statuses_url":"https://api.github.com/repos/kubernetes/contrib/statuses/f45ff45a2d5c2d3414b0d5750452cf9211c06b31","head":{"label":"pwittrock:server-hostname-debug","ref":"server-hostname-debug","sha":"f45ff45a2d5c2d3414b0d5750452cf9211c06b31","user":{"login":"pwittrock","id":7882754,"avatar_url":"https://avatars.githubusercontent.com/u/7882754?v=3","gravatar_id":"","url":"https://api.github.com/users/pwittrock","html_url":"https://github.com/pwittrock","followers_url":"https://api.github.com/users/pwittrock/followers","following_url":"https://api.github.com/users/pwittrock/following{/other_user}","gists_url":"https://api.github.com/users/pwittrock/gists{/gist_id}","starred_url":"https://api.github.com/users/pwittrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwittrock/subscriptions","organizations_url":"https://api.github.com/users/pwittrock/orgs","repos_url":"https://api.github.com/users/pwittrock/repos","events_url":"https://api.github.com/users/pwittrock/events{/privacy}","received_events_url":"https://api.github.com/users/pwittrock/received_events","type":"User","site_admin":false},"repo":{"id":52980108,"name":"contrib","full_name":"pwittrock/contrib","owner":{"login":"pwittrock","id":7882754,"avatar_url":"https://avatars.githubusercontent.com/u/7882754?v=3","gravatar_id":"","url":"https://api.github.com/users/pwittrock","html_url":"https://github.com/pwittrock","followers_url":"https://api.github.com/users/pwittrock/followers","following_url":"https://api.github.com/users/pwittrock/following{/other_user}","gists_url":"https://api.github.com/users/pwittrock/gists{/gist_id}","starred_url":"https://api.github.com/users/pwittrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwittrock/subscriptions","organizations_url":"https://api.github.com/users/pwittrock/orgs","repos_url":"https://api.github.com/users/pwittrock/repos","events_url":"https://api.github.com/users/pwittrock/events{/privacy}","received_events_url":"https://api.github.com/users/pwittrock/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pwittrock/contrib","description":"This is a place for various components in the Kubernetes ecosystem that aren't part of the Kubernetes core.","fork":true,"url":"https://api.github.com/repos/pwittrock/contrib","forks_url":"https://api.github.com/repos/pwittrock/contrib/forks","keys_url":"https://api.github.com/repos/pwittrock/contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pwittrock/contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pwittrock/contrib/teams","hooks_url":"https://api.github.com/repos/pwittrock/contrib/hooks","issue_events_url":"https://api.github.com/repos/pwittrock/contrib/issues/events{/number}","events_url":"https://api.github.com/repos/pwittrock/contrib/events","assignees_url":"https://api.github.com/repos/pwittrock/contrib/assignees{/user}","branches_url":"https://api.github.com/repos/pwittrock/contrib/branches{/branch}","tags_url":"https://api.github.com/repos/pwittrock/contrib/tags","blobs_url":"https://api.github.com/repos/pwittrock/contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pwittrock/contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pwittrock/contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/pwittrock/contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pwittrock/contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/pwittrock/contrib/languages","stargazers_url":"https://api.github.com/repos/pwittrock/contrib/stargazers","contributors_url":"https://api.github.com/repos/pwittrock/contrib/contributors","subscribers_url":"https://api.github.com/repos/pwittrock/contrib/subscribers","subscription_url":"https://api.github.com/repos/pwittrock/contrib/subscription","commits_url":"https://api.github.com/repos/pwittrock/contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/pwittrock/contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/pwittrock/contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/pwittrock/contrib/issues/comments{/number}","contents_url":"https://api.github.com/repos/pwittrock/contrib/contents/{+path}","compare_url":"https://api.github.com/repos/pwittrock/contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pwittrock/contrib/merges","archive_url":"https://api.github.com/repos/pwittrock/contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pwittrock/contrib/downloads","issues_url":"https://api.github.com/repos/pwittrock/contrib/issues{/number}","pulls_url":"https://api.github.com/repos/pwittrock/contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/pwittrock/contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/pwittrock/contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pwittrock/contrib/labels{/name}","releases_url":"https://api.github.com/repos/pwittrock/contrib/releases{/id}","deployments_url":"https://api.github.com/repos/pwittrock/contrib/deployments","created_at":"2016-03-02T16:56:25Z","updated_at":"2016-03-02T16:56:27Z","pushed_at":"2016-03-02T18:23:54Z","git_url":"git://github.com/pwittrock/contrib.git","ssh_url":"git@github.com:pwittrock/contrib.git","clone_url":"https://github.com/pwittrock/contrib.git","svn_url":"https://github.com/pwittrock/contrib","homepage":"","size":17227,"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":"kubernetes:master","ref":"master","sha":"6b543779bd056bbb2ea3276a1151ca1c2027940b","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":40686014,"name":"contrib","full_name":"kubernetes/contrib","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/contrib","description":"This is a place for various components in the Kubernetes ecosystem that aren't part of the Kubernetes core.","fork":false,"url":"https://api.github.com/repos/kubernetes/contrib","forks_url":"https://api.github.com/repos/kubernetes/contrib/forks","keys_url":"https://api.github.com/repos/kubernetes/contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/contrib/teams","hooks_url":"https://api.github.com/repos/kubernetes/contrib/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/contrib/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/contrib/events","assignees_url":"https://api.github.com/repos/kubernetes/contrib/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/contrib/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/contrib/tags","blobs_url":"https://api.github.com/repos/kubernetes/contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/contrib/languages","stargazers_url":"https://api.github.com/repos/kubernetes/contrib/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/contrib/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/contrib/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/contrib/subscription","commits_url":"https://api.github.com/repos/kubernetes/contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/contrib/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/contrib/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/contrib/merges","archive_url":"https://api.github.com/repos/kubernetes/contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/contrib/downloads","issues_url":"https://api.github.com/repos/kubernetes/contrib/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/contrib/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/contrib/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/contrib/deployments","created_at":"2015-08-13T23:18:26Z","updated_at":"2016-03-02T13:05:06Z","pushed_at":"2016-03-02T18:28:03Z","git_url":"git://github.com/kubernetes/contrib.git","ssh_url":"git@github.com:kubernetes/contrib.git","clone_url":"https://github.com/kubernetes/contrib.git","svn_url":"https://github.com/kubernetes/contrib","homepage":"","size":28944,"stargazers_count":175,"watchers_count":175,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":168,"mirror_url":null,"open_issues_count":116,"forks":168,"open_issues":116,"watchers":175,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/529"},"html":{"href":"https://github.com/kubernetes/contrib/pull/529"},"issue":{"href":"https://api.github.com/repos/kubernetes/contrib/issues/529"},"comments":{"href":"https://api.github.com/repos/kubernetes/contrib/issues/529/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/529/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/529/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/contrib/statuses/f45ff45a2d5c2d3414b0d5750452cf9211c06b31"}}}}