{"action":"opened","number":21,"pull_request":{"url":"https://api.github.com/repos/baris/fullerite/pulls/21","id":42759872,"html_url":"https://github.com/baris/fullerite/pull/21","diff_url":"https://github.com/baris/fullerite/pull/21.diff","patch_url":"https://github.com/baris/fullerite/pull/21.patch","issue_url":"https://api.github.com/repos/baris/fullerite/issues/21","number":21,"state":"open","locked":false,"title":"If the config file isn't valid, throw an error and exit (FIXES: #18)","user":{"login":"jaxxstorm","id":1622940,"avatar_url":"https://avatars.githubusercontent.com/u/1622940?v=3","gravatar_id":"","url":"https://api.github.com/users/jaxxstorm","html_url":"https://github.com/jaxxstorm","followers_url":"https://api.github.com/users/jaxxstorm/followers","following_url":"https://api.github.com/users/jaxxstorm/following{/other_user}","gists_url":"https://api.github.com/users/jaxxstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/jaxxstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaxxstorm/subscriptions","organizations_url":"https://api.github.com/users/jaxxstorm/orgs","repos_url":"https://api.github.com/users/jaxxstorm/repos","events_url":"https://api.github.com/users/jaxxstorm/events{/privacy}","received_events_url":"https://api.github.com/users/jaxxstorm/received_events","type":"User","site_admin":false},"body":"If the JSON in the config file isn't valid for whatever reason, we should exit the process immediately.\r\n\r\nAccording to #13 there aren't a lot of tests yet, so I'm submitting this without any tests.\r\n\r\nManual test:\r\n\r\n```\r\n# Ensure we have bad json\r\nroot@host fullerite]# cat /etc/fullerite.conf | python -m json.tool\r\nExpecting , delimiter: line 19 column 13 (char 492)\r\n\r\n[root@host fullerite]# fullerite -c /etc/fullerite.conf\r\nINFO[19 Aug 15 00:05 BST] Starting fullerite...                         app=fullerite\r\nINFO[19 Aug 15 00:05 BST] Reading configuration file at /etc/fullerite.conf  app=fullerite pkg=config\r\nERRO[19 Aug 15 00:05 BST] Invalid JSON in config: invalid character '\"' after object key:value pair  app=fullerite pkg=config\r\n```\r\n\r\nThis is the first time I've ever written any Go, so apologies if it's nasty/horrible!","created_at":"2015-08-18T23:07:50Z","updated_at":"2015-08-18T23:07:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e423a720129cff6e2746b56275ebe47ebab57884","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/baris/fullerite/pulls/21/commits","review_comments_url":"https://api.github.com/repos/baris/fullerite/pulls/21/comments","review_comment_url":"https://api.github.com/repos/baris/fullerite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/baris/fullerite/issues/21/comments","statuses_url":"https://api.github.com/repos/baris/fullerite/statuses/b2b15c4c399edd15d401309fb2ca7c6e513c5812","head":{"label":"jaxxstorm:invalid_json_throw_error","ref":"invalid_json_throw_error","sha":"b2b15c4c399edd15d401309fb2ca7c6e513c5812","user":{"login":"jaxxstorm","id":1622940,"avatar_url":"https://avatars.githubusercontent.com/u/1622940?v=3","gravatar_id":"","url":"https://api.github.com/users/jaxxstorm","html_url":"https://github.com/jaxxstorm","followers_url":"https://api.github.com/users/jaxxstorm/followers","following_url":"https://api.github.com/users/jaxxstorm/following{/other_user}","gists_url":"https://api.github.com/users/jaxxstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/jaxxstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaxxstorm/subscriptions","organizations_url":"https://api.github.com/users/jaxxstorm/orgs","repos_url":"https://api.github.com/users/jaxxstorm/repos","events_url":"https://api.github.com/users/jaxxstorm/events{/privacy}","received_events_url":"https://api.github.com/users/jaxxstorm/received_events","type":"User","site_admin":false},"repo":{"id":40989070,"name":"fullerite","full_name":"jaxxstorm/fullerite","owner":{"login":"jaxxstorm","id":1622940,"avatar_url":"https://avatars.githubusercontent.com/u/1622940?v=3","gravatar_id":"","url":"https://api.github.com/users/jaxxstorm","html_url":"https://github.com/jaxxstorm","followers_url":"https://api.github.com/users/jaxxstorm/followers","following_url":"https://api.github.com/users/jaxxstorm/following{/other_user}","gists_url":"https://api.github.com/users/jaxxstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/jaxxstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaxxstorm/subscriptions","organizations_url":"https://api.github.com/users/jaxxstorm/orgs","repos_url":"https://api.github.com/users/jaxxstorm/repos","events_url":"https://api.github.com/users/jaxxstorm/events{/privacy}","received_events_url":"https://api.github.com/users/jaxxstorm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jaxxstorm/fullerite","description":"metrics collector","fork":true,"url":"https://api.github.com/repos/jaxxstorm/fullerite","forks_url":"https://api.github.com/repos/jaxxstorm/fullerite/forks","keys_url":"https://api.github.com/repos/jaxxstorm/fullerite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jaxxstorm/fullerite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jaxxstorm/fullerite/teams","hooks_url":"https://api.github.com/repos/jaxxstorm/fullerite/hooks","issue_events_url":"https://api.github.com/repos/jaxxstorm/fullerite/issues/events{/number}","events_url":"https://api.github.com/repos/jaxxstorm/fullerite/events","assignees_url":"https://api.github.com/repos/jaxxstorm/fullerite/assignees{/user}","branches_url":"https://api.github.com/repos/jaxxstorm/fullerite/branches{/branch}","tags_url":"https://api.github.com/repos/jaxxstorm/fullerite/tags","blobs_url":"https://api.github.com/repos/jaxxstorm/fullerite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jaxxstorm/fullerite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jaxxstorm/fullerite/git/refs{/sha}","trees_url":"https://api.github.com/repos/jaxxstorm/fullerite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jaxxstorm/fullerite/statuses/{sha}","languages_url":"https://api.github.com/repos/jaxxstorm/fullerite/languages","stargazers_url":"https://api.github.com/repos/jaxxstorm/fullerite/stargazers","contributors_url":"https://api.github.com/repos/jaxxstorm/fullerite/contributors","subscribers_url":"https://api.github.com/repos/jaxxstorm/fullerite/subscribers","subscription_url":"https://api.github.com/repos/jaxxstorm/fullerite/subscription","commits_url":"https://api.github.com/repos/jaxxstorm/fullerite/commits{/sha}","git_commits_url":"https://api.github.com/repos/jaxxstorm/fullerite/git/commits{/sha}","comments_url":"https://api.github.com/repos/jaxxstorm/fullerite/comments{/number}","issue_comment_url":"https://api.github.com/repos/jaxxstorm/fullerite/issues/comments{/number}","contents_url":"https://api.github.com/repos/jaxxstorm/fullerite/contents/{+path}","compare_url":"https://api.github.com/repos/jaxxstorm/fullerite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jaxxstorm/fullerite/merges","archive_url":"https://api.github.com/repos/jaxxstorm/fullerite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jaxxstorm/fullerite/downloads","issues_url":"https://api.github.com/repos/jaxxstorm/fullerite/issues{/number}","pulls_url":"https://api.github.com/repos/jaxxstorm/fullerite/pulls{/number}","milestones_url":"https://api.github.com/repos/jaxxstorm/fullerite/milestones{/number}","notifications_url":"https://api.github.com/repos/jaxxstorm/fullerite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jaxxstorm/fullerite/labels{/name}","releases_url":"https://api.github.com/repos/jaxxstorm/fullerite/releases{/id}","created_at":"2015-08-18T18:06:47Z","updated_at":"2015-08-18T18:06:48Z","pushed_at":"2015-08-18T21:14:26Z","git_url":"git://github.com/jaxxstorm/fullerite.git","ssh_url":"git@github.com:jaxxstorm/fullerite.git","clone_url":"https://github.com/jaxxstorm/fullerite.git","svn_url":"https://github.com/jaxxstorm/fullerite","homepage":null,"size":865,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"baris:master","ref":"master","sha":"c0476cc030362cb0de8a5945915c9067fe76bde5","user":{"login":"baris","id":17591,"avatar_url":"https://avatars.githubusercontent.com/u/17591?v=3","gravatar_id":"","url":"https://api.github.com/users/baris","html_url":"https://github.com/baris","followers_url":"https://api.github.com/users/baris/followers","following_url":"https://api.github.com/users/baris/following{/other_user}","gists_url":"https://api.github.com/users/baris/gists{/gist_id}","starred_url":"https://api.github.com/users/baris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baris/subscriptions","organizations_url":"https://api.github.com/users/baris/orgs","repos_url":"https://api.github.com/users/baris/repos","events_url":"https://api.github.com/users/baris/events{/privacy}","received_events_url":"https://api.github.com/users/baris/received_events","type":"User","site_admin":false},"repo":{"id":39368384,"name":"fullerite","full_name":"baris/fullerite","owner":{"login":"baris","id":17591,"avatar_url":"https://avatars.githubusercontent.com/u/17591?v=3","gravatar_id":"","url":"https://api.github.com/users/baris","html_url":"https://github.com/baris","followers_url":"https://api.github.com/users/baris/followers","following_url":"https://api.github.com/users/baris/following{/other_user}","gists_url":"https://api.github.com/users/baris/gists{/gist_id}","starred_url":"https://api.github.com/users/baris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baris/subscriptions","organizations_url":"https://api.github.com/users/baris/orgs","repos_url":"https://api.github.com/users/baris/repos","events_url":"https://api.github.com/users/baris/events{/privacy}","received_events_url":"https://api.github.com/users/baris/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/baris/fullerite","description":"metrics collector","fork":false,"url":"https://api.github.com/repos/baris/fullerite","forks_url":"https://api.github.com/repos/baris/fullerite/forks","keys_url":"https://api.github.com/repos/baris/fullerite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/baris/fullerite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/baris/fullerite/teams","hooks_url":"https://api.github.com/repos/baris/fullerite/hooks","issue_events_url":"https://api.github.com/repos/baris/fullerite/issues/events{/number}","events_url":"https://api.github.com/repos/baris/fullerite/events","assignees_url":"https://api.github.com/repos/baris/fullerite/assignees{/user}","branches_url":"https://api.github.com/repos/baris/fullerite/branches{/branch}","tags_url":"https://api.github.com/repos/baris/fullerite/tags","blobs_url":"https://api.github.com/repos/baris/fullerite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/baris/fullerite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/baris/fullerite/git/refs{/sha}","trees_url":"https://api.github.com/repos/baris/fullerite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/baris/fullerite/statuses/{sha}","languages_url":"https://api.github.com/repos/baris/fullerite/languages","stargazers_url":"https://api.github.com/repos/baris/fullerite/stargazers","contributors_url":"https://api.github.com/repos/baris/fullerite/contributors","subscribers_url":"https://api.github.com/repos/baris/fullerite/subscribers","subscription_url":"https://api.github.com/repos/baris/fullerite/subscription","commits_url":"https://api.github.com/repos/baris/fullerite/commits{/sha}","git_commits_url":"https://api.github.com/repos/baris/fullerite/git/commits{/sha}","comments_url":"https://api.github.com/repos/baris/fullerite/comments{/number}","issue_comment_url":"https://api.github.com/repos/baris/fullerite/issues/comments{/number}","contents_url":"https://api.github.com/repos/baris/fullerite/contents/{+path}","compare_url":"https://api.github.com/repos/baris/fullerite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/baris/fullerite/merges","archive_url":"https://api.github.com/repos/baris/fullerite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/baris/fullerite/downloads","issues_url":"https://api.github.com/repos/baris/fullerite/issues{/number}","pulls_url":"https://api.github.com/repos/baris/fullerite/pulls{/number}","milestones_url":"https://api.github.com/repos/baris/fullerite/milestones{/number}","notifications_url":"https://api.github.com/repos/baris/fullerite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/baris/fullerite/labels{/name}","releases_url":"https://api.github.com/repos/baris/fullerite/releases{/id}","created_at":"2015-07-20T07:01:49Z","updated_at":"2015-08-18T18:03:23Z","pushed_at":"2015-08-18T23:07:50Z","git_url":"git://github.com/baris/fullerite.git","ssh_url":"git@github.com:baris/fullerite.git","clone_url":"https://github.com/baris/fullerite.git","svn_url":"https://github.com/baris/fullerite","homepage":null,"size":865,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":8,"forks":6,"open_issues":8,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/baris/fullerite/pulls/21"},"html":{"href":"https://github.com/baris/fullerite/pull/21"},"issue":{"href":"https://api.github.com/repos/baris/fullerite/issues/21"},"comments":{"href":"https://api.github.com/repos/baris/fullerite/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/baris/fullerite/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/baris/fullerite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/baris/fullerite/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/baris/fullerite/statuses/b2b15c4c399edd15d401309fb2ca7c6e513c5812"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":5,"deletions":1,"changed_files":1}}