{"action":"created","comment":{"url":"https://api.github.com/repos/mholt/caddy/pulls/comments/39758259","id":39758259,"diff_hunk":"@@ -43,6 +47,15 @@ func main() {\n \t\tos.Exit(0)\n \t}\n \n+\tif app.Debug {\n+\t\tgo func() {\n+\t\t\tif !app.Quiet {\n+\t\t\t\tlog.Printf(\"Start pprof server on localhost:%s (you can change this with -pprof-port)\\n\", app.PprofPort)\n+\t\t\t}\n+\t\t\tfmt.Println(http.ListenAndServe(\"localhost:\"+app.PprofPort, nil))","path":"main.go","position":27,"original_position":27,"commit_id":"9dbf6e5fee831c0c3612636604174dbbac29de5d","original_commit_id":"9dbf6e5fee831c0c3612636604174dbbac29de5d","user":{"login":"abiosoft","id":240448,"avatar_url":"https://avatars.githubusercontent.com/u/240448?v=3","gravatar_id":"","url":"https://api.github.com/users/abiosoft","html_url":"https://github.com/abiosoft","followers_url":"https://api.github.com/users/abiosoft/followers","following_url":"https://api.github.com/users/abiosoft/following{/other_user}","gists_url":"https://api.github.com/users/abiosoft/gists{/gist_id}","starred_url":"https://api.github.com/users/abiosoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abiosoft/subscriptions","organizations_url":"https://api.github.com/users/abiosoft/orgs","repos_url":"https://api.github.com/users/abiosoft/repos","events_url":"https://api.github.com/users/abiosoft/events{/privacy}","received_events_url":"https://api.github.com/users/abiosoft/received_events","type":"User","site_admin":false},"body":"is there a reason why its forcefully scoped to localhost?","created_at":"2015-09-17T15:18:43Z","updated_at":"2015-09-17T15:18:43Z","html_url":"https://github.com/mholt/caddy/pull/244#discussion_r39758259","pull_request_url":"https://api.github.com/repos/mholt/caddy/pulls/244","_links":{"self":{"href":"https://api.github.com/repos/mholt/caddy/pulls/comments/39758259"},"html":{"href":"https://github.com/mholt/caddy/pull/244#discussion_r39758259"},"pull_request":{"href":"https://api.github.com/repos/mholt/caddy/pulls/244"}}},"pull_request":{"url":"https://api.github.com/repos/mholt/caddy/pulls/244","id":44866341,"html_url":"https://github.com/mholt/caddy/pull/244","diff_url":"https://github.com/mholt/caddy/pull/244.diff","patch_url":"https://github.com/mholt/caddy/pull/244.patch","issue_url":"https://api.github.com/repos/mholt/caddy/issues/244","number":244,"state":"open","locked":false,"title":"Add /debug/pprof handlers","user":{"login":"LK4D4","id":101445,"avatar_url":"https://avatars.githubusercontent.com/u/101445?v=3","gravatar_id":"","url":"https://api.github.com/users/LK4D4","html_url":"https://github.com/LK4D4","followers_url":"https://api.github.com/users/LK4D4/followers","following_url":"https://api.github.com/users/LK4D4/following{/other_user}","gists_url":"https://api.github.com/users/LK4D4/gists{/gist_id}","starred_url":"https://api.github.com/users/LK4D4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LK4D4/subscriptions","organizations_url":"https://api.github.com/users/LK4D4/orgs","repos_url":"https://api.github.com/users/LK4D4/repos","events_url":"https://api.github.com/users/LK4D4/events{/privacy}","received_events_url":"https://api.github.com/users/LK4D4/received_events","type":"User","site_admin":false},"body":"Those handlers are necessary for profiling and debugging.\r\nhttps://golang.org/pkg/net/http/pprof/\r\nLet me know if you want this another way.","created_at":"2015-09-13T03:54:52Z","updated_at":"2015-09-17T15:18:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37ea1bcff5c186b31d3548a1e291ddb7c2031a59","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mholt/caddy/pulls/244/commits","review_comments_url":"https://api.github.com/repos/mholt/caddy/pulls/244/comments","review_comment_url":"https://api.github.com/repos/mholt/caddy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mholt/caddy/issues/244/comments","statuses_url":"https://api.github.com/repos/mholt/caddy/statuses/9dbf6e5fee831c0c3612636604174dbbac29de5d","head":{"label":"LK4D4:add_pprof","ref":"add_pprof","sha":"9dbf6e5fee831c0c3612636604174dbbac29de5d","user":{"login":"LK4D4","id":101445,"avatar_url":"https://avatars.githubusercontent.com/u/101445?v=3","gravatar_id":"","url":"https://api.github.com/users/LK4D4","html_url":"https://github.com/LK4D4","followers_url":"https://api.github.com/users/LK4D4/followers","following_url":"https://api.github.com/users/LK4D4/following{/other_user}","gists_url":"https://api.github.com/users/LK4D4/gists{/gist_id}","starred_url":"https://api.github.com/users/LK4D4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LK4D4/subscriptions","organizations_url":"https://api.github.com/users/LK4D4/orgs","repos_url":"https://api.github.com/users/LK4D4/repos","events_url":"https://api.github.com/users/LK4D4/events{/privacy}","received_events_url":"https://api.github.com/users/LK4D4/received_events","type":"User","site_admin":false},"repo":{"id":39036356,"name":"caddy","full_name":"LK4D4/caddy","owner":{"login":"LK4D4","id":101445,"avatar_url":"https://avatars.githubusercontent.com/u/101445?v=3","gravatar_id":"","url":"https://api.github.com/users/LK4D4","html_url":"https://github.com/LK4D4","followers_url":"https://api.github.com/users/LK4D4/followers","following_url":"https://api.github.com/users/LK4D4/following{/other_user}","gists_url":"https://api.github.com/users/LK4D4/gists{/gist_id}","starred_url":"https://api.github.com/users/LK4D4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LK4D4/subscriptions","organizations_url":"https://api.github.com/users/LK4D4/orgs","repos_url":"https://api.github.com/users/LK4D4/repos","events_url":"https://api.github.com/users/LK4D4/events{/privacy}","received_events_url":"https://api.github.com/users/LK4D4/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LK4D4/caddy","description":"Fast general-purpose HTTP/2 web server for any platform.","fork":true,"url":"https://api.github.com/repos/LK4D4/caddy","forks_url":"https://api.github.com/repos/LK4D4/caddy/forks","keys_url":"https://api.github.com/repos/LK4D4/caddy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LK4D4/caddy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LK4D4/caddy/teams","hooks_url":"https://api.github.com/repos/LK4D4/caddy/hooks","issue_events_url":"https://api.github.com/repos/LK4D4/caddy/issues/events{/number}","events_url":"https://api.github.com/repos/LK4D4/caddy/events","assignees_url":"https://api.github.com/repos/LK4D4/caddy/assignees{/user}","branches_url":"https://api.github.com/repos/LK4D4/caddy/branches{/branch}","tags_url":"https://api.github.com/repos/LK4D4/caddy/tags","blobs_url":"https://api.github.com/repos/LK4D4/caddy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LK4D4/caddy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LK4D4/caddy/git/refs{/sha}","trees_url":"https://api.github.com/repos/LK4D4/caddy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LK4D4/caddy/statuses/{sha}","languages_url":"https://api.github.com/repos/LK4D4/caddy/languages","stargazers_url":"https://api.github.com/repos/LK4D4/caddy/stargazers","contributors_url":"https://api.github.com/repos/LK4D4/caddy/contributors","subscribers_url":"https://api.github.com/repos/LK4D4/caddy/subscribers","subscription_url":"https://api.github.com/repos/LK4D4/caddy/subscription","commits_url":"https://api.github.com/repos/LK4D4/caddy/commits{/sha}","git_commits_url":"https://api.github.com/repos/LK4D4/caddy/git/commits{/sha}","comments_url":"https://api.github.com/repos/LK4D4/caddy/comments{/number}","issue_comment_url":"https://api.github.com/repos/LK4D4/caddy/issues/comments{/number}","contents_url":"https://api.github.com/repos/LK4D4/caddy/contents/{+path}","compare_url":"https://api.github.com/repos/LK4D4/caddy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LK4D4/caddy/merges","archive_url":"https://api.github.com/repos/LK4D4/caddy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LK4D4/caddy/downloads","issues_url":"https://api.github.com/repos/LK4D4/caddy/issues{/number}","pulls_url":"https://api.github.com/repos/LK4D4/caddy/pulls{/number}","milestones_url":"https://api.github.com/repos/LK4D4/caddy/milestones{/number}","notifications_url":"https://api.github.com/repos/LK4D4/caddy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LK4D4/caddy/labels{/name}","releases_url":"https://api.github.com/repos/LK4D4/caddy/releases{/id}","created_at":"2015-07-13T20:45:19Z","updated_at":"2015-07-13T20:45:20Z","pushed_at":"2015-09-14T17:50:37Z","git_url":"git://github.com/LK4D4/caddy.git","ssh_url":"git@github.com:LK4D4/caddy.git","clone_url":"https://github.com/LK4D4/caddy.git","svn_url":"https://github.com/LK4D4/caddy","homepage":"https://caddyserver.com","size":882,"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":"mholt:master","ref":"master","sha":"f4054b69541f7f6f898afc5ecbf370ffa70060e0","user":{"login":"mholt","id":1128849,"avatar_url":"https://avatars.githubusercontent.com/u/1128849?v=3","gravatar_id":"","url":"https://api.github.com/users/mholt","html_url":"https://github.com/mholt","followers_url":"https://api.github.com/users/mholt/followers","following_url":"https://api.github.com/users/mholt/following{/other_user}","gists_url":"https://api.github.com/users/mholt/gists{/gist_id}","starred_url":"https://api.github.com/users/mholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mholt/subscriptions","organizations_url":"https://api.github.com/users/mholt/orgs","repos_url":"https://api.github.com/users/mholt/repos","events_url":"https://api.github.com/users/mholt/events{/privacy}","received_events_url":"https://api.github.com/users/mholt/received_events","type":"User","site_admin":false},"repo":{"id":29207621,"name":"caddy","full_name":"mholt/caddy","owner":{"login":"mholt","id":1128849,"avatar_url":"https://avatars.githubusercontent.com/u/1128849?v=3","gravatar_id":"","url":"https://api.github.com/users/mholt","html_url":"https://github.com/mholt","followers_url":"https://api.github.com/users/mholt/followers","following_url":"https://api.github.com/users/mholt/following{/other_user}","gists_url":"https://api.github.com/users/mholt/gists{/gist_id}","starred_url":"https://api.github.com/users/mholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mholt/subscriptions","organizations_url":"https://api.github.com/users/mholt/orgs","repos_url":"https://api.github.com/users/mholt/repos","events_url":"https://api.github.com/users/mholt/events{/privacy}","received_events_url":"https://api.github.com/users/mholt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mholt/caddy","description":"Fast general-purpose HTTP/2 web server for any platform.","fork":false,"url":"https://api.github.com/repos/mholt/caddy","forks_url":"https://api.github.com/repos/mholt/caddy/forks","keys_url":"https://api.github.com/repos/mholt/caddy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mholt/caddy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mholt/caddy/teams","hooks_url":"https://api.github.com/repos/mholt/caddy/hooks","issue_events_url":"https://api.github.com/repos/mholt/caddy/issues/events{/number}","events_url":"https://api.github.com/repos/mholt/caddy/events","assignees_url":"https://api.github.com/repos/mholt/caddy/assignees{/user}","branches_url":"https://api.github.com/repos/mholt/caddy/branches{/branch}","tags_url":"https://api.github.com/repos/mholt/caddy/tags","blobs_url":"https://api.github.com/repos/mholt/caddy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mholt/caddy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mholt/caddy/git/refs{/sha}","trees_url":"https://api.github.com/repos/mholt/caddy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mholt/caddy/statuses/{sha}","languages_url":"https://api.github.com/repos/mholt/caddy/languages","stargazers_url":"https://api.github.com/repos/mholt/caddy/stargazers","contributors_url":"https://api.github.com/repos/mholt/caddy/contributors","subscribers_url":"https://api.github.com/repos/mholt/caddy/subscribers","subscription_url":"https://api.github.com/repos/mholt/caddy/subscription","commits_url":"https://api.github.com/repos/mholt/caddy/commits{/sha}","git_commits_url":"https://api.github.com/repos/mholt/caddy/git/commits{/sha}","comments_url":"https://api.github.com/repos/mholt/caddy/comments{/number}","issue_comment_url":"https://api.github.com/repos/mholt/caddy/issues/comments{/number}","contents_url":"https://api.github.com/repos/mholt/caddy/contents/{+path}","compare_url":"https://api.github.com/repos/mholt/caddy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mholt/caddy/merges","archive_url":"https://api.github.com/repos/mholt/caddy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mholt/caddy/downloads","issues_url":"https://api.github.com/repos/mholt/caddy/issues{/number}","pulls_url":"https://api.github.com/repos/mholt/caddy/pulls{/number}","milestones_url":"https://api.github.com/repos/mholt/caddy/milestones{/number}","notifications_url":"https://api.github.com/repos/mholt/caddy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mholt/caddy/labels{/name}","releases_url":"https://api.github.com/repos/mholt/caddy/releases{/id}","created_at":"2015-01-13T19:45:03Z","updated_at":"2015-09-17T14:31:12Z","pushed_at":"2015-09-17T03:33:04Z","git_url":"git://github.com/mholt/caddy.git","ssh_url":"git@github.com:mholt/caddy.git","clone_url":"https://github.com/mholt/caddy.git","svn_url":"https://github.com/mholt/caddy","homepage":"https://caddyserver.com","size":2350,"stargazers_count":2183,"watchers_count":2183,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":140,"mirror_url":null,"open_issues_count":46,"forks":140,"open_issues":46,"watchers":2183,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mholt/caddy/pulls/244"},"html":{"href":"https://github.com/mholt/caddy/pull/244"},"issue":{"href":"https://api.github.com/repos/mholt/caddy/issues/244"},"comments":{"href":"https://api.github.com/repos/mholt/caddy/issues/244/comments"},"review_comments":{"href":"https://api.github.com/repos/mholt/caddy/pulls/244/comments"},"review_comment":{"href":"https://api.github.com/repos/mholt/caddy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mholt/caddy/pulls/244/commits"},"statuses":{"href":"https://api.github.com/repos/mholt/caddy/statuses/9dbf6e5fee831c0c3612636604174dbbac29de5d"}}}}