{"action":"created","comment":{"url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/pulls/comments/46882867","id":46882867,"diff_hunk":"@@ -0,0 +1,15 @@\n+package login\n+\n+import (\n+\t\"github.com/brooklyncentral/brooklyn-cli/error_handler\"\n+\t\"github.com/brooklyncentral/brooklyn-cli/net\"\n+)\n+\n+func Login(network *net.Network) string {","path":"api/login/login.go","position":8,"original_position":8,"commit_id":"2b4957c167a4433c72211f88739bf1503c886449","original_commit_id":"2b4957c167a4433c72211f88739bf1503c886449","user":{"login":"robertgmoss","id":1054185,"avatar_url":"https://avatars.githubusercontent.com/u/1054185?v=3","gravatar_id":"","url":"https://api.github.com/users/robertgmoss","html_url":"https://github.com/robertgmoss","followers_url":"https://api.github.com/users/robertgmoss/followers","following_url":"https://api.github.com/users/robertgmoss/following{/other_user}","gists_url":"https://api.github.com/users/robertgmoss/gists{/gist_id}","starred_url":"https://api.github.com/users/robertgmoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertgmoss/subscriptions","organizations_url":"https://api.github.com/users/robertgmoss/orgs","repos_url":"https://api.github.com/users/robertgmoss/repos","events_url":"https://api.github.com/users/robertgmoss/events{/privacy}","received_events_url":"https://api.github.com/users/robertgmoss/received_events","type":"User","site_admin":false},"body":"There is already a server api package with this endpoint","created_at":"2015-12-07T21:49:31Z","updated_at":"2015-12-07T21:49:31Z","html_url":"https://github.com/brooklyncentral/brooklyn-cli/pull/6#discussion_r46882867","pull_request_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/pulls/comments/46882867"},"html":{"href":"https://github.com/brooklyncentral/brooklyn-cli/pull/6#discussion_r46882867"},"pull_request":{"href":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/pulls/6","id":52836147,"html_url":"https://github.com/brooklyncentral/brooklyn-cli/pull/6","diff_url":"https://github.com/brooklyncentral/brooklyn-cli/pull/6.diff","patch_url":"https://github.com/brooklyncentral/brooklyn-cli/pull/6.patch","issue_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/issues/6","number":6,"state":"open","locked":false,"title":"Introduce a generic Exit/Error handler and use this for the login command","user":{"login":"lloyddave","id":15086450,"avatar_url":"https://avatars.githubusercontent.com/u/15086450?v=3","gravatar_id":"","url":"https://api.github.com/users/lloyddave","html_url":"https://github.com/lloyddave","followers_url":"https://api.github.com/users/lloyddave/followers","following_url":"https://api.github.com/users/lloyddave/following{/other_user}","gists_url":"https://api.github.com/users/lloyddave/gists{/gist_id}","starred_url":"https://api.github.com/users/lloyddave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lloyddave/subscriptions","organizations_url":"https://api.github.com/users/lloyddave/orgs","repos_url":"https://api.github.com/users/lloyddave/repos","events_url":"https://api.github.com/users/lloyddave/events{/privacy}","received_events_url":"https://api.github.com/users/lloyddave/received_events","type":"User","site_admin":false},"body":"The error_handler package provides function `ErrorExit`; the function prints\r\nout an error message to `STDERR` and exits with a given or default exit code.\r\nThe first argument can be of type `string` or `error`.  The second argument\r\n(optional) should be of type `integer` and is for setting the exit code.\r\nThree integer constants are defined for setting the exit code:\r\n- `CLIUsageErrorExitCode` - for reporting command syntax errors\r\n- `CliGenericErrorExitCode` - for reporting processing errors\r\n- `CLITrapErrorCode` - for reporting abnormal/trapped errors\r\nIf the second argument is not provided the `CliGenericErrorExitCode` value is used.\r\n\r\nThe `login` command has been extended to connect to Brooklyn and obtain the version string which is then printed to `STDOUT`.","created_at":"2015-12-07T11:59:35Z","updated_at":"2015-12-07T21:49:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"753decca16617feb9915df4f504a71b1d3d615c9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/pulls/6/commits","review_comments_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/pulls/6/comments","review_comment_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/issues/6/comments","statuses_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/statuses/2b4957c167a4433c72211f88739bf1503c886449","head":{"label":"lloyddave:login-opt-arg","ref":"login-opt-arg","sha":"2b4957c167a4433c72211f88739bf1503c886449","user":{"login":"lloyddave","id":15086450,"avatar_url":"https://avatars.githubusercontent.com/u/15086450?v=3","gravatar_id":"","url":"https://api.github.com/users/lloyddave","html_url":"https://github.com/lloyddave","followers_url":"https://api.github.com/users/lloyddave/followers","following_url":"https://api.github.com/users/lloyddave/following{/other_user}","gists_url":"https://api.github.com/users/lloyddave/gists{/gist_id}","starred_url":"https://api.github.com/users/lloyddave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lloyddave/subscriptions","organizations_url":"https://api.github.com/users/lloyddave/orgs","repos_url":"https://api.github.com/users/lloyddave/repos","events_url":"https://api.github.com/users/lloyddave/events{/privacy}","received_events_url":"https://api.github.com/users/lloyddave/received_events","type":"User","site_admin":false},"repo":{"id":44623014,"name":"brooklyn-cli","full_name":"lloyddave/brooklyn-cli","owner":{"login":"lloyddave","id":15086450,"avatar_url":"https://avatars.githubusercontent.com/u/15086450?v=3","gravatar_id":"","url":"https://api.github.com/users/lloyddave","html_url":"https://github.com/lloyddave","followers_url":"https://api.github.com/users/lloyddave/followers","following_url":"https://api.github.com/users/lloyddave/following{/other_user}","gists_url":"https://api.github.com/users/lloyddave/gists{/gist_id}","starred_url":"https://api.github.com/users/lloyddave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lloyddave/subscriptions","organizations_url":"https://api.github.com/users/lloyddave/orgs","repos_url":"https://api.github.com/users/lloyddave/repos","events_url":"https://api.github.com/users/lloyddave/events{/privacy}","received_events_url":"https://api.github.com/users/lloyddave/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lloyddave/brooklyn-cli","description":"Go CLI client for Brooklyn REST API","fork":true,"url":"https://api.github.com/repos/lloyddave/brooklyn-cli","forks_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/forks","keys_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/teams","hooks_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/hooks","issue_events_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/issues/events{/number}","events_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/events","assignees_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/assignees{/user}","branches_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/branches{/branch}","tags_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/tags","blobs_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/languages","stargazers_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/stargazers","contributors_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/contributors","subscribers_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/subscribers","subscription_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/subscription","commits_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/contents/{+path}","compare_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/merges","archive_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/downloads","issues_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/issues{/number}","pulls_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/labels{/name}","releases_url":"https://api.github.com/repos/lloyddave/brooklyn-cli/releases{/id}","created_at":"2015-10-20T17:26:11Z","updated_at":"2015-10-20T17:26:12Z","pushed_at":"2015-12-07T11:53:17Z","git_url":"git://github.com/lloyddave/brooklyn-cli.git","ssh_url":"git@github.com:lloyddave/brooklyn-cli.git","clone_url":"https://github.com/lloyddave/brooklyn-cli.git","svn_url":"https://github.com/lloyddave/brooklyn-cli","homepage":null,"size":77,"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":"brooklyncentral:master","ref":"master","sha":"c6cf81d6b96a297862ae4582b3e602695a20c895","user":{"login":"brooklyncentral","id":1587357,"avatar_url":"https://avatars.githubusercontent.com/u/1587357?v=3","gravatar_id":"","url":"https://api.github.com/users/brooklyncentral","html_url":"https://github.com/brooklyncentral","followers_url":"https://api.github.com/users/brooklyncentral/followers","following_url":"https://api.github.com/users/brooklyncentral/following{/other_user}","gists_url":"https://api.github.com/users/brooklyncentral/gists{/gist_id}","starred_url":"https://api.github.com/users/brooklyncentral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brooklyncentral/subscriptions","organizations_url":"https://api.github.com/users/brooklyncentral/orgs","repos_url":"https://api.github.com/users/brooklyncentral/repos","events_url":"https://api.github.com/users/brooklyncentral/events{/privacy}","received_events_url":"https://api.github.com/users/brooklyncentral/received_events","type":"Organization","site_admin":false},"repo":{"id":33272064,"name":"brooklyn-cli","full_name":"brooklyncentral/brooklyn-cli","owner":{"login":"brooklyncentral","id":1587357,"avatar_url":"https://avatars.githubusercontent.com/u/1587357?v=3","gravatar_id":"","url":"https://api.github.com/users/brooklyncentral","html_url":"https://github.com/brooklyncentral","followers_url":"https://api.github.com/users/brooklyncentral/followers","following_url":"https://api.github.com/users/brooklyncentral/following{/other_user}","gists_url":"https://api.github.com/users/brooklyncentral/gists{/gist_id}","starred_url":"https://api.github.com/users/brooklyncentral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brooklyncentral/subscriptions","organizations_url":"https://api.github.com/users/brooklyncentral/orgs","repos_url":"https://api.github.com/users/brooklyncentral/repos","events_url":"https://api.github.com/users/brooklyncentral/events{/privacy}","received_events_url":"https://api.github.com/users/brooklyncentral/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/brooklyncentral/brooklyn-cli","description":"Go CLI client for Brooklyn REST API","fork":false,"url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli","forks_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/forks","keys_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/teams","hooks_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/hooks","issue_events_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/issues/events{/number}","events_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/events","assignees_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/assignees{/user}","branches_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/branches{/branch}","tags_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/tags","blobs_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/languages","stargazers_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/stargazers","contributors_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/contributors","subscribers_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/subscribers","subscription_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/subscription","commits_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/contents/{+path}","compare_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/merges","archive_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/downloads","issues_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/issues{/number}","pulls_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/labels{/name}","releases_url":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/releases{/id}","created_at":"2015-04-01T20:45:53Z","updated_at":"2015-10-20T13:43:48Z","pushed_at":"2015-12-07T15:18:49Z","git_url":"git://github.com/brooklyncentral/brooklyn-cli.git","ssh_url":"git@github.com:brooklyncentral/brooklyn-cli.git","clone_url":"https://github.com/brooklyncentral/brooklyn-cli.git","svn_url":"https://github.com/brooklyncentral/brooklyn-cli","homepage":null,"size":113,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":3,"forks":5,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/pulls/6"},"html":{"href":"https://github.com/brooklyncentral/brooklyn-cli/pull/6"},"issue":{"href":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/issues/6"},"comments":{"href":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/brooklyncentral/brooklyn-cli/statuses/2b4957c167a4433c72211f88739bf1503c886449"}}}}