{"action":"created","comment":{"url":"https://api.github.com/repos/distributed-monitoring/agent/pulls/comments/201197056","pull_request_review_id":135650473,"id":201197056,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTE5NzA1Ng==","diff_hunk":"@@ -18,19 +18,40 @@ package main\n \n import (\n \t\"flag\"\n+\t\"github.com/BurntSushi/toml\"\n \t\"log\"\n )\n \n var serverTypeOpt = flag.String(\"type\", \"pubsub\", \"server type: pubsub, api\")\n \n const confDirPath = \"/etc/collectd/collectd.conf.d/\"","path":"cmd/server/main.go","position":10,"original_position":10,"commit_id":"a52978ba2d1ac75cd007edc4af43eef86fe77c06","original_commit_id":"a52978ba2d1ac75cd007edc4af43eef86fe77c06","user":{"login":"yu-kasuya","id":15024080,"node_id":"MDQ6VXNlcjE1MDI0MDgw","avatar_url":"https://avatars0.githubusercontent.com/u/15024080?v=4","gravatar_id":"","url":"https://api.github.com/users/yu-kasuya","html_url":"https://github.com/yu-kasuya","followers_url":"https://api.github.com/users/yu-kasuya/followers","following_url":"https://api.github.com/users/yu-kasuya/following{/other_user}","gists_url":"https://api.github.com/users/yu-kasuya/gists{/gist_id}","starred_url":"https://api.github.com/users/yu-kasuya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yu-kasuya/subscriptions","organizations_url":"https://api.github.com/users/yu-kasuya/orgs","repos_url":"https://api.github.com/users/yu-kasuya/repos","events_url":"https://api.github.com/users/yu-kasuya/events{/privacy}","received_events_url":"https://api.github.com/users/yu-kasuya/received_events","type":"User","site_admin":false},"body":"umm, how to write to input config var into global var?","created_at":"2018-07-10T01:50:34Z","updated_at":"2018-07-10T01:50:34Z","html_url":"https://github.com/distributed-monitoring/agent/pull/28#discussion_r201197056","pull_request_url":"https://api.github.com/repos/distributed-monitoring/agent/pulls/28","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/distributed-monitoring/agent/pulls/comments/201197056"},"html":{"href":"https://github.com/distributed-monitoring/agent/pull/28#discussion_r201197056"},"pull_request":{"href":"https://api.github.com/repos/distributed-monitoring/agent/pulls/28"}},"in_reply_to_id":200959096},"pull_request":{"url":"https://api.github.com/repos/distributed-monitoring/agent/pulls/28","id":200028983,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMDI4OTgz","html_url":"https://github.com/distributed-monitoring/agent/pull/28","diff_url":"https://github.com/distributed-monitoring/agent/pull/28.diff","patch_url":"https://github.com/distributed-monitoring/agent/pull/28.patch","issue_url":"https://api.github.com/repos/distributed-monitoring/agent/issues/28","number":28,"state":"open","locked":false,"title":"Add config file","user":{"login":"yu-kasuya","id":15024080,"node_id":"MDQ6VXNlcjE1MDI0MDgw","avatar_url":"https://avatars0.githubusercontent.com/u/15024080?v=4","gravatar_id":"","url":"https://api.github.com/users/yu-kasuya","html_url":"https://github.com/yu-kasuya","followers_url":"https://api.github.com/users/yu-kasuya/followers","following_url":"https://api.github.com/users/yu-kasuya/following{/other_user}","gists_url":"https://api.github.com/users/yu-kasuya/gists{/gist_id}","starred_url":"https://api.github.com/users/yu-kasuya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yu-kasuya/subscriptions","organizations_url":"https://api.github.com/users/yu-kasuya/orgs","repos_url":"https://api.github.com/users/yu-kasuya/repos","events_url":"https://api.github.com/users/yu-kasuya/events{/privacy}","received_events_url":"https://api.github.com/users/yu-kasuya/received_events","type":"User","site_admin":false},"body":"Is that OK to write structure in main.go? And could you check directory of config file?","created_at":"2018-07-09T08:42:14Z","updated_at":"2018-07-10T01:50:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4055517668d64908e361b40da1644f533b40de45","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/distributed-monitoring/agent/pulls/28/commits","review_comments_url":"https://api.github.com/repos/distributed-monitoring/agent/pulls/28/comments","review_comment_url":"https://api.github.com/repos/distributed-monitoring/agent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/distributed-monitoring/agent/issues/28/comments","statuses_url":"https://api.github.com/repos/distributed-monitoring/agent/statuses/a52978ba2d1ac75cd007edc4af43eef86fe77c06","head":{"label":"distributed-monitoring:toml_config","ref":"toml_config","sha":"a52978ba2d1ac75cd007edc4af43eef86fe77c06","user":{"login":"distributed-monitoring","id":31496376,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNDk2Mzc2","avatar_url":"https://avatars3.githubusercontent.com/u/31496376?v=4","gravatar_id":"","url":"https://api.github.com/users/distributed-monitoring","html_url":"https://github.com/distributed-monitoring","followers_url":"https://api.github.com/users/distributed-monitoring/followers","following_url":"https://api.github.com/users/distributed-monitoring/following{/other_user}","gists_url":"https://api.github.com/users/distributed-monitoring/gists{/gist_id}","starred_url":"https://api.github.com/users/distributed-monitoring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distributed-monitoring/subscriptions","organizations_url":"https://api.github.com/users/distributed-monitoring/orgs","repos_url":"https://api.github.com/users/distributed-monitoring/repos","events_url":"https://api.github.com/users/distributed-monitoring/events{/privacy}","received_events_url":"https://api.github.com/users/distributed-monitoring/received_events","type":"Organization","site_admin":false},"repo":{"id":121732177,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE3MzIxNzc=","name":"agent","full_name":"distributed-monitoring/agent","owner":{"login":"distributed-monitoring","id":31496376,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNDk2Mzc2","avatar_url":"https://avatars3.githubusercontent.com/u/31496376?v=4","gravatar_id":"","url":"https://api.github.com/users/distributed-monitoring","html_url":"https://github.com/distributed-monitoring","followers_url":"https://api.github.com/users/distributed-monitoring/followers","following_url":"https://api.github.com/users/distributed-monitoring/following{/other_user}","gists_url":"https://api.github.com/users/distributed-monitoring/gists{/gist_id}","starred_url":"https://api.github.com/users/distributed-monitoring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distributed-monitoring/subscriptions","organizations_url":"https://api.github.com/users/distributed-monitoring/orgs","repos_url":"https://api.github.com/users/distributed-monitoring/repos","events_url":"https://api.github.com/users/distributed-monitoring/events{/privacy}","received_events_url":"https://api.github.com/users/distributed-monitoring/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/distributed-monitoring/agent","description":null,"fork":false,"url":"https://api.github.com/repos/distributed-monitoring/agent","forks_url":"https://api.github.com/repos/distributed-monitoring/agent/forks","keys_url":"https://api.github.com/repos/distributed-monitoring/agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/distributed-monitoring/agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/distributed-monitoring/agent/teams","hooks_url":"https://api.github.com/repos/distributed-monitoring/agent/hooks","issue_events_url":"https://api.github.com/repos/distributed-monitoring/agent/issues/events{/number}","events_url":"https://api.github.com/repos/distributed-monitoring/agent/events","assignees_url":"https://api.github.com/repos/distributed-monitoring/agent/assignees{/user}","branches_url":"https://api.github.com/repos/distributed-monitoring/agent/branches{/branch}","tags_url":"https://api.github.com/repos/distributed-monitoring/agent/tags","blobs_url":"https://api.github.com/repos/distributed-monitoring/agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/distributed-monitoring/agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/distributed-monitoring/agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/distributed-monitoring/agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/distributed-monitoring/agent/statuses/{sha}","languages_url":"https://api.github.com/repos/distributed-monitoring/agent/languages","stargazers_url":"https://api.github.com/repos/distributed-monitoring/agent/stargazers","contributors_url":"https://api.github.com/repos/distributed-monitoring/agent/contributors","subscribers_url":"https://api.github.com/repos/distributed-monitoring/agent/subscribers","subscription_url":"https://api.github.com/repos/distributed-monitoring/agent/subscription","commits_url":"https://api.github.com/repos/distributed-monitoring/agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/distributed-monitoring/agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/distributed-monitoring/agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/distributed-monitoring/agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/distributed-monitoring/agent/contents/{+path}","compare_url":"https://api.github.com/repos/distributed-monitoring/agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/distributed-monitoring/agent/merges","archive_url":"https://api.github.com/repos/distributed-monitoring/agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/distributed-monitoring/agent/downloads","issues_url":"https://api.github.com/repos/distributed-monitoring/agent/issues{/number}","pulls_url":"https://api.github.com/repos/distributed-monitoring/agent/pulls{/number}","milestones_url":"https://api.github.com/repos/distributed-monitoring/agent/milestones{/number}","notifications_url":"https://api.github.com/repos/distributed-monitoring/agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/distributed-monitoring/agent/labels{/name}","releases_url":"https://api.github.com/repos/distributed-monitoring/agent/releases{/id}","deployments_url":"https://api.github.com/repos/distributed-monitoring/agent/deployments","created_at":"2018-02-16T09:12:47Z","updated_at":"2018-07-09T12:50:30Z","pushed_at":"2018-07-09T12:50:29Z","git_url":"git://github.com/distributed-monitoring/agent.git","ssh_url":"git@github.com:distributed-monitoring/agent.git","clone_url":"https://github.com/distributed-monitoring/agent.git","svn_url":"https://github.com/distributed-monitoring/agent","homepage":null,"size":230,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":12,"watchers":0,"default_branch":"master"}},"base":{"label":"distributed-monitoring:master","ref":"master","sha":"ab4de74838effe38fbf420923a3211850db3cf91","user":{"login":"distributed-monitoring","id":31496376,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNDk2Mzc2","avatar_url":"https://avatars3.githubusercontent.com/u/31496376?v=4","gravatar_id":"","url":"https://api.github.com/users/distributed-monitoring","html_url":"https://github.com/distributed-monitoring","followers_url":"https://api.github.com/users/distributed-monitoring/followers","following_url":"https://api.github.com/users/distributed-monitoring/following{/other_user}","gists_url":"https://api.github.com/users/distributed-monitoring/gists{/gist_id}","starred_url":"https://api.github.com/users/distributed-monitoring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distributed-monitoring/subscriptions","organizations_url":"https://api.github.com/users/distributed-monitoring/orgs","repos_url":"https://api.github.com/users/distributed-monitoring/repos","events_url":"https://api.github.com/users/distributed-monitoring/events{/privacy}","received_events_url":"https://api.github.com/users/distributed-monitoring/received_events","type":"Organization","site_admin":false},"repo":{"id":121732177,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE3MzIxNzc=","name":"agent","full_name":"distributed-monitoring/agent","owner":{"login":"distributed-monitoring","id":31496376,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNDk2Mzc2","avatar_url":"https://avatars3.githubusercontent.com/u/31496376?v=4","gravatar_id":"","url":"https://api.github.com/users/distributed-monitoring","html_url":"https://github.com/distributed-monitoring","followers_url":"https://api.github.com/users/distributed-monitoring/followers","following_url":"https://api.github.com/users/distributed-monitoring/following{/other_user}","gists_url":"https://api.github.com/users/distributed-monitoring/gists{/gist_id}","starred_url":"https://api.github.com/users/distributed-monitoring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distributed-monitoring/subscriptions","organizations_url":"https://api.github.com/users/distributed-monitoring/orgs","repos_url":"https://api.github.com/users/distributed-monitoring/repos","events_url":"https://api.github.com/users/distributed-monitoring/events{/privacy}","received_events_url":"https://api.github.com/users/distributed-monitoring/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/distributed-monitoring/agent","description":null,"fork":false,"url":"https://api.github.com/repos/distributed-monitoring/agent","forks_url":"https://api.github.com/repos/distributed-monitoring/agent/forks","keys_url":"https://api.github.com/repos/distributed-monitoring/agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/distributed-monitoring/agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/distributed-monitoring/agent/teams","hooks_url":"https://api.github.com/repos/distributed-monitoring/agent/hooks","issue_events_url":"https://api.github.com/repos/distributed-monitoring/agent/issues/events{/number}","events_url":"https://api.github.com/repos/distributed-monitoring/agent/events","assignees_url":"https://api.github.com/repos/distributed-monitoring/agent/assignees{/user}","branches_url":"https://api.github.com/repos/distributed-monitoring/agent/branches{/branch}","tags_url":"https://api.github.com/repos/distributed-monitoring/agent/tags","blobs_url":"https://api.github.com/repos/distributed-monitoring/agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/distributed-monitoring/agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/distributed-monitoring/agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/distributed-monitoring/agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/distributed-monitoring/agent/statuses/{sha}","languages_url":"https://api.github.com/repos/distributed-monitoring/agent/languages","stargazers_url":"https://api.github.com/repos/distributed-monitoring/agent/stargazers","contributors_url":"https://api.github.com/repos/distributed-monitoring/agent/contributors","subscribers_url":"https://api.github.com/repos/distributed-monitoring/agent/subscribers","subscription_url":"https://api.github.com/repos/distributed-monitoring/agent/subscription","commits_url":"https://api.github.com/repos/distributed-monitoring/agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/distributed-monitoring/agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/distributed-monitoring/agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/distributed-monitoring/agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/distributed-monitoring/agent/contents/{+path}","compare_url":"https://api.github.com/repos/distributed-monitoring/agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/distributed-monitoring/agent/merges","archive_url":"https://api.github.com/repos/distributed-monitoring/agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/distributed-monitoring/agent/downloads","issues_url":"https://api.github.com/repos/distributed-monitoring/agent/issues{/number}","pulls_url":"https://api.github.com/repos/distributed-monitoring/agent/pulls{/number}","milestones_url":"https://api.github.com/repos/distributed-monitoring/agent/milestones{/number}","notifications_url":"https://api.github.com/repos/distributed-monitoring/agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/distributed-monitoring/agent/labels{/name}","releases_url":"https://api.github.com/repos/distributed-monitoring/agent/releases{/id}","deployments_url":"https://api.github.com/repos/distributed-monitoring/agent/deployments","created_at":"2018-02-16T09:12:47Z","updated_at":"2018-07-09T12:50:30Z","pushed_at":"2018-07-09T12:50:29Z","git_url":"git://github.com/distributed-monitoring/agent.git","ssh_url":"git@github.com:distributed-monitoring/agent.git","clone_url":"https://github.com/distributed-monitoring/agent.git","svn_url":"https://github.com/distributed-monitoring/agent","homepage":null,"size":230,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":12,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/distributed-monitoring/agent/pulls/28"},"html":{"href":"https://github.com/distributed-monitoring/agent/pull/28"},"issue":{"href":"https://api.github.com/repos/distributed-monitoring/agent/issues/28"},"comments":{"href":"https://api.github.com/repos/distributed-monitoring/agent/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/distributed-monitoring/agent/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/distributed-monitoring/agent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/distributed-monitoring/agent/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/distributed-monitoring/agent/statuses/a52978ba2d1ac75cd007edc4af43eef86fe77c06"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"yu-kasuya"}}