{"action":"created","comment":{"url":"https://api.github.com/repos/romana/contrib/pulls/comments/57651644","id":57651644,"diff_hunk":"@@ -0,0 +1,57 @@\n+package main\n+\n+import (\n+\t\"flag\"\n+\t\"fmt\"\n+\tsearch \"github.com/romana/contrib/rsearch\"\n+\t\"log\"\n+\t//\t\"net/http\"\n+\t\"encoding/json\"\n+\n+\t//\t\"io\"\n+)\n+\n+func main() {\n+\tvar cfgFile = flag.String(\"c\", \"\", \"Kubernetes reverse search config file\")\n+\tvar server = flag.Bool(\"s\", false, \"Start a server\")\n+\tvar host = flag.String(\"h\", \"\", \"Protocol://host for client to connect to\")\n+\tvar searchTag = flag.String(\"r\", \"\", \"Search resources by tag\")\n+\tflag.Parse()\n+\n+\tdone := make(chan search.Done)\n+\n+\tconfig, err := search.NewConfig(*cfgFile)\n+\tif *host != \"\" {\n+\t\tconfig.Server.Host = *host\n+\t}\n+\n+\tif err != nil {\n+\t\tfmt.Printf(\"Can not read config file %s, %s\\n\", *cfgFile, err)","path":"rsearch/bin/main.go","position":29,"original_position":29,"commit_id":"35a61a8de01c0fb01be55d832ed3f061eaa2da85","original_commit_id":"35a61a8de01c0fb01be55d832ed3f061eaa2da85","user":{"login":"cgilmour","id":892558,"avatar_url":"https://avatars.githubusercontent.com/u/892558?v=3","gravatar_id":"","url":"https://api.github.com/users/cgilmour","html_url":"https://github.com/cgilmour","followers_url":"https://api.github.com/users/cgilmour/followers","following_url":"https://api.github.com/users/cgilmour/following{/other_user}","gists_url":"https://api.github.com/users/cgilmour/gists{/gist_id}","starred_url":"https://api.github.com/users/cgilmour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgilmour/subscriptions","organizations_url":"https://api.github.com/users/cgilmour/orgs","repos_url":"https://api.github.com/users/cgilmour/repos","events_url":"https://api.github.com/users/cgilmour/events{/privacy}","received_events_url":"https://api.github.com/users/cgilmour/received_events","type":"User","site_admin":false},"body":"Some things use `fmt`, others use `log`. Is there a reason for the difference?","created_at":"2016-03-28T23:32:04Z","updated_at":"2016-03-28T23:32:04Z","html_url":"https://github.com/romana/contrib/pull/1#discussion_r57651644","pull_request_url":"https://api.github.com/repos/romana/contrib/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/romana/contrib/pulls/comments/57651644"},"html":{"href":"https://github.com/romana/contrib/pull/1#discussion_r57651644"},"pull_request":{"href":"https://api.github.com/repos/romana/contrib/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/romana/contrib/pulls/1","id":63876462,"html_url":"https://github.com/romana/contrib/pull/1","diff_url":"https://github.com/romana/contrib/pull/1.diff","patch_url":"https://github.com/romana/contrib/pull/1.patch","issue_url":"https://api.github.com/repos/romana/contrib/issues/1","number":1,"state":"open","locked":false,"title":"Dev/rsearch","user":{"login":"flashvoid","id":446328,"avatar_url":"https://avatars.githubusercontent.com/u/446328?v=3","gravatar_id":"","url":"https://api.github.com/users/flashvoid","html_url":"https://github.com/flashvoid","followers_url":"https://api.github.com/users/flashvoid/followers","following_url":"https://api.github.com/users/flashvoid/following{/other_user}","gists_url":"https://api.github.com/users/flashvoid/gists{/gist_id}","starred_url":"https://api.github.com/users/flashvoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flashvoid/subscriptions","organizations_url":"https://api.github.com/users/flashvoid/orgs","repos_url":"https://api.github.com/users/flashvoid/repos","events_url":"https://api.github.com/users/flashvoid/events{/privacy}","received_events_url":"https://api.github.com/users/flashvoid/received_events","type":"User","site_admin":false},"body":"Reverse search\r\n============\r\n\r\n\r\nThis is a utility for reverse search in kubernetes (find all objects who select given label).\r\n\r\nUsage\r\n=====\r\n\r\nProvided binary can act as either client or server depending on command line options.\r\n\r\nServer instance connects to Kubernetes API and monitors resource changes\r\n```\r\n./rsearch -c go/src/github.com/romana/contrib/rsearch/config.ini -s\r\n```\r\n\r\nClient then can query the server\r\n```\r\n./rsearch -c go/src/github.com/romana/contrib/rsearch/config.ini -h http://localhost -r 'tier/backend#'\r\n```\r\n* `-r` label to query, `#` sign is not a part of a label but terminator that need to be added to request (TODO at this point i'm not really sure it's needed)\r\n* `-h` url address where server instance is running ","created_at":"2016-03-23T12:49:29Z","updated_at":"2016-03-28T23:32:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a221cf5f8e6890f2cef94fdba5c630be5b4008e2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/romana/contrib/pulls/1/commits","review_comments_url":"https://api.github.com/repos/romana/contrib/pulls/1/comments","review_comment_url":"https://api.github.com/repos/romana/contrib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/romana/contrib/issues/1/comments","statuses_url":"https://api.github.com/repos/romana/contrib/statuses/35a61a8de01c0fb01be55d832ed3f061eaa2da85","head":{"label":"romana:dev/rsearch","ref":"dev/rsearch","sha":"35a61a8de01c0fb01be55d832ed3f061eaa2da85","user":{"login":"romana","id":9849297,"avatar_url":"https://avatars.githubusercontent.com/u/9849297?v=3","gravatar_id":"","url":"https://api.github.com/users/romana","html_url":"https://github.com/romana","followers_url":"https://api.github.com/users/romana/followers","following_url":"https://api.github.com/users/romana/following{/other_user}","gists_url":"https://api.github.com/users/romana/gists{/gist_id}","starred_url":"https://api.github.com/users/romana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romana/subscriptions","organizations_url":"https://api.github.com/users/romana/orgs","repos_url":"https://api.github.com/users/romana/repos","events_url":"https://api.github.com/users/romana/events{/privacy}","received_events_url":"https://api.github.com/users/romana/received_events","type":"Organization","site_admin":false},"repo":{"id":54154757,"name":"contrib","full_name":"romana/contrib","owner":{"login":"romana","id":9849297,"avatar_url":"https://avatars.githubusercontent.com/u/9849297?v=3","gravatar_id":"","url":"https://api.github.com/users/romana","html_url":"https://github.com/romana","followers_url":"https://api.github.com/users/romana/followers","following_url":"https://api.github.com/users/romana/following{/other_user}","gists_url":"https://api.github.com/users/romana/gists{/gist_id}","starred_url":"https://api.github.com/users/romana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romana/subscriptions","organizations_url":"https://api.github.com/users/romana/orgs","repos_url":"https://api.github.com/users/romana/repos","events_url":"https://api.github.com/users/romana/events{/privacy}","received_events_url":"https://api.github.com/users/romana/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/romana/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/romana/contrib","forks_url":"https://api.github.com/repos/romana/contrib/forks","keys_url":"https://api.github.com/repos/romana/contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/romana/contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/romana/contrib/teams","hooks_url":"https://api.github.com/repos/romana/contrib/hooks","issue_events_url":"https://api.github.com/repos/romana/contrib/issues/events{/number}","events_url":"https://api.github.com/repos/romana/contrib/events","assignees_url":"https://api.github.com/repos/romana/contrib/assignees{/user}","branches_url":"https://api.github.com/repos/romana/contrib/branches{/branch}","tags_url":"https://api.github.com/repos/romana/contrib/tags","blobs_url":"https://api.github.com/repos/romana/contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/romana/contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/romana/contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/romana/contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/romana/contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/romana/contrib/languages","stargazers_url":"https://api.github.com/repos/romana/contrib/stargazers","contributors_url":"https://api.github.com/repos/romana/contrib/contributors","subscribers_url":"https://api.github.com/repos/romana/contrib/subscribers","subscription_url":"https://api.github.com/repos/romana/contrib/subscription","commits_url":"https://api.github.com/repos/romana/contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/romana/contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/romana/contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/romana/contrib/issues/comments{/number}","contents_url":"https://api.github.com/repos/romana/contrib/contents/{+path}","compare_url":"https://api.github.com/repos/romana/contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/romana/contrib/merges","archive_url":"https://api.github.com/repos/romana/contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/romana/contrib/downloads","issues_url":"https://api.github.com/repos/romana/contrib/issues{/number}","pulls_url":"https://api.github.com/repos/romana/contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/romana/contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/romana/contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/romana/contrib/labels{/name}","releases_url":"https://api.github.com/repos/romana/contrib/releases{/id}","deployments_url":"https://api.github.com/repos/romana/contrib/deployments","created_at":"2016-03-17T22:09:41Z","updated_at":"2016-03-17T22:09:43Z","pushed_at":"2016-03-23T22:15:33Z","git_url":"git://github.com/romana/contrib.git","ssh_url":"git@github.com:romana/contrib.git","clone_url":"https://github.com/romana/contrib.git","svn_url":"https://github.com/romana/contrib","homepage":"","size":20633,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"romana:master","ref":"master","sha":"c24f27c814340ecd4be2b6f2f766200443bc2046","user":{"login":"romana","id":9849297,"avatar_url":"https://avatars.githubusercontent.com/u/9849297?v=3","gravatar_id":"","url":"https://api.github.com/users/romana","html_url":"https://github.com/romana","followers_url":"https://api.github.com/users/romana/followers","following_url":"https://api.github.com/users/romana/following{/other_user}","gists_url":"https://api.github.com/users/romana/gists{/gist_id}","starred_url":"https://api.github.com/users/romana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romana/subscriptions","organizations_url":"https://api.github.com/users/romana/orgs","repos_url":"https://api.github.com/users/romana/repos","events_url":"https://api.github.com/users/romana/events{/privacy}","received_events_url":"https://api.github.com/users/romana/received_events","type":"Organization","site_admin":false},"repo":{"id":54154757,"name":"contrib","full_name":"romana/contrib","owner":{"login":"romana","id":9849297,"avatar_url":"https://avatars.githubusercontent.com/u/9849297?v=3","gravatar_id":"","url":"https://api.github.com/users/romana","html_url":"https://github.com/romana","followers_url":"https://api.github.com/users/romana/followers","following_url":"https://api.github.com/users/romana/following{/other_user}","gists_url":"https://api.github.com/users/romana/gists{/gist_id}","starred_url":"https://api.github.com/users/romana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romana/subscriptions","organizations_url":"https://api.github.com/users/romana/orgs","repos_url":"https://api.github.com/users/romana/repos","events_url":"https://api.github.com/users/romana/events{/privacy}","received_events_url":"https://api.github.com/users/romana/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/romana/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/romana/contrib","forks_url":"https://api.github.com/repos/romana/contrib/forks","keys_url":"https://api.github.com/repos/romana/contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/romana/contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/romana/contrib/teams","hooks_url":"https://api.github.com/repos/romana/contrib/hooks","issue_events_url":"https://api.github.com/repos/romana/contrib/issues/events{/number}","events_url":"https://api.github.com/repos/romana/contrib/events","assignees_url":"https://api.github.com/repos/romana/contrib/assignees{/user}","branches_url":"https://api.github.com/repos/romana/contrib/branches{/branch}","tags_url":"https://api.github.com/repos/romana/contrib/tags","blobs_url":"https://api.github.com/repos/romana/contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/romana/contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/romana/contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/romana/contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/romana/contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/romana/contrib/languages","stargazers_url":"https://api.github.com/repos/romana/contrib/stargazers","contributors_url":"https://api.github.com/repos/romana/contrib/contributors","subscribers_url":"https://api.github.com/repos/romana/contrib/subscribers","subscription_url":"https://api.github.com/repos/romana/contrib/subscription","commits_url":"https://api.github.com/repos/romana/contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/romana/contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/romana/contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/romana/contrib/issues/comments{/number}","contents_url":"https://api.github.com/repos/romana/contrib/contents/{+path}","compare_url":"https://api.github.com/repos/romana/contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/romana/contrib/merges","archive_url":"https://api.github.com/repos/romana/contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/romana/contrib/downloads","issues_url":"https://api.github.com/repos/romana/contrib/issues{/number}","pulls_url":"https://api.github.com/repos/romana/contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/romana/contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/romana/contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/romana/contrib/labels{/name}","releases_url":"https://api.github.com/repos/romana/contrib/releases{/id}","deployments_url":"https://api.github.com/repos/romana/contrib/deployments","created_at":"2016-03-17T22:09:41Z","updated_at":"2016-03-17T22:09:43Z","pushed_at":"2016-03-23T22:15:33Z","git_url":"git://github.com/romana/contrib.git","ssh_url":"git@github.com:romana/contrib.git","clone_url":"https://github.com/romana/contrib.git","svn_url":"https://github.com/romana/contrib","homepage":"","size":20633,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/romana/contrib/pulls/1"},"html":{"href":"https://github.com/romana/contrib/pull/1"},"issue":{"href":"https://api.github.com/repos/romana/contrib/issues/1"},"comments":{"href":"https://api.github.com/repos/romana/contrib/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/romana/contrib/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/romana/contrib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/romana/contrib/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/romana/contrib/statuses/35a61a8de01c0fb01be55d832ed3f061eaa2da85"}}}}