{"action":"created","comment":{"url":"https://api.github.com/repos/influxdb/telegraf/pulls/comments/35977160","id":35977160,"diff_hunk":"@@ -74,7 +79,10 @@ func DiskPartitions(all bool) ([]DiskPartitionStat, error) {\n \t\t\tFstype:     common.IntToString(stat.Fstypename[:]),\n \t\t\tOpts:       opts,\n \t\t}\n-\t\tret = append(ret, d)\n+\t\t_, ok := set[d.Fstype]\n+\t\tif ok || len(fstypes) == 0 {","path":"plugins/system/ps/disk/disk_darwin.go","position":22,"original_position":22,"commit_id":"8a99b9216d08292fba84ec53777fe66437b0b88c","original_commit_id":"8a99b9216d08292fba84ec53777fe66437b0b88c","user":{"login":"srfraser","id":5933384,"avatar_url":"https://avatars.githubusercontent.com/u/5933384?v=3","gravatar_id":"","url":"https://api.github.com/users/srfraser","html_url":"https://github.com/srfraser","followers_url":"https://api.github.com/users/srfraser/followers","following_url":"https://api.github.com/users/srfraser/following{/other_user}","gists_url":"https://api.github.com/users/srfraser/gists{/gist_id}","starred_url":"https://api.github.com/users/srfraser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srfraser/subscriptions","organizations_url":"https://api.github.com/users/srfraser/orgs","repos_url":"https://api.github.com/users/srfraser/repos","events_url":"https://api.github.com/users/srfraser/events{/privacy}","received_events_url":"https://api.github.com/users/srfraser/received_events","type":"User","site_admin":false},"body":"I'm new to Go, and don't know if this would be more idiomatic:\r\n\r\n    if _, ok := set[d.Fstype]; ok || len(fstypes) == 0 {","created_at":"2015-07-31T14:17:27Z","updated_at":"2015-07-31T14:17:27Z","html_url":"https://github.com/influxdb/telegraf/pull/81#discussion_r35977160","pull_request_url":"https://api.github.com/repos/influxdb/telegraf/pulls/81","_links":{"self":{"href":"https://api.github.com/repos/influxdb/telegraf/pulls/comments/35977160"},"html":{"href":"https://github.com/influxdb/telegraf/pull/81#discussion_r35977160"},"pull_request":{"href":"https://api.github.com/repos/influxdb/telegraf/pulls/81"}}},"pull_request":{"url":"https://api.github.com/repos/influxdb/telegraf/pulls/81","id":41255244,"html_url":"https://github.com/influxdb/telegraf/pull/81","diff_url":"https://github.com/influxdb/telegraf/pull/81.diff","patch_url":"https://github.com/influxdb/telegraf/pull/81.patch","issue_url":"https://api.github.com/repos/influxdb/telegraf/issues/81","number":81,"state":"open","locked":false,"title":"Add ability for disk usage to filter by filesystem type","user":{"login":"srfraser","id":5933384,"avatar_url":"https://avatars.githubusercontent.com/u/5933384?v=3","gravatar_id":"","url":"https://api.github.com/users/srfraser","html_url":"https://github.com/srfraser","followers_url":"https://api.github.com/users/srfraser/followers","following_url":"https://api.github.com/users/srfraser/following{/other_user}","gists_url":"https://api.github.com/users/srfraser/gists{/gist_id}","starred_url":"https://api.github.com/users/srfraser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srfraser/subscriptions","organizations_url":"https://api.github.com/users/srfraser/orgs","repos_url":"https://api.github.com/users/srfraser/repos","events_url":"https://api.github.com/users/srfraser/events{/privacy}","received_events_url":"https://api.github.com/users/srfraser/received_events","type":"User","site_admin":false},"body":"When running telegraf initially, it found all the NFS, Lustre, tmpfs, /proc and similar filesystems on the nodes, creating a lot of statistics that were duplicated or of little use.\r\n\r\nThe config file now takes an array of filesystem types to accept when looking at disk usage:\r\n\r\n    fstypes = [\"ext4\", \"xfs\"]","created_at":"2015-07-30T16:40:00Z","updated_at":"2015-07-31T14:17:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"123eaacb33a68e05d6bb196bcf3144dc2bc1d43a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/influxdb/telegraf/pulls/81/commits","review_comments_url":"https://api.github.com/repos/influxdb/telegraf/pulls/81/comments","review_comment_url":"https://api.github.com/repos/influxdb/telegraf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/influxdb/telegraf/issues/81/comments","statuses_url":"https://api.github.com/repos/influxdb/telegraf/statuses/8a99b9216d08292fba84ec53777fe66437b0b88c","head":{"label":"srfraser:master","ref":"master","sha":"8a99b9216d08292fba84ec53777fe66437b0b88c","user":{"login":"srfraser","id":5933384,"avatar_url":"https://avatars.githubusercontent.com/u/5933384?v=3","gravatar_id":"","url":"https://api.github.com/users/srfraser","html_url":"https://github.com/srfraser","followers_url":"https://api.github.com/users/srfraser/followers","following_url":"https://api.github.com/users/srfraser/following{/other_user}","gists_url":"https://api.github.com/users/srfraser/gists{/gist_id}","starred_url":"https://api.github.com/users/srfraser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srfraser/subscriptions","organizations_url":"https://api.github.com/users/srfraser/orgs","repos_url":"https://api.github.com/users/srfraser/repos","events_url":"https://api.github.com/users/srfraser/events{/privacy}","received_events_url":"https://api.github.com/users/srfraser/received_events","type":"User","site_admin":false},"repo":{"id":39901861,"name":"telegraf","full_name":"srfraser/telegraf","owner":{"login":"srfraser","id":5933384,"avatar_url":"https://avatars.githubusercontent.com/u/5933384?v=3","gravatar_id":"","url":"https://api.github.com/users/srfraser","html_url":"https://github.com/srfraser","followers_url":"https://api.github.com/users/srfraser/followers","following_url":"https://api.github.com/users/srfraser/following{/other_user}","gists_url":"https://api.github.com/users/srfraser/gists{/gist_id}","starred_url":"https://api.github.com/users/srfraser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srfraser/subscriptions","organizations_url":"https://api.github.com/users/srfraser/orgs","repos_url":"https://api.github.com/users/srfraser/repos","events_url":"https://api.github.com/users/srfraser/events{/privacy}","received_events_url":"https://api.github.com/users/srfraser/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/srfraser/telegraf","description":"The plugin-driven server agent for reporting metrics into InfluxDB.","fork":true,"url":"https://api.github.com/repos/srfraser/telegraf","forks_url":"https://api.github.com/repos/srfraser/telegraf/forks","keys_url":"https://api.github.com/repos/srfraser/telegraf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/srfraser/telegraf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/srfraser/telegraf/teams","hooks_url":"https://api.github.com/repos/srfraser/telegraf/hooks","issue_events_url":"https://api.github.com/repos/srfraser/telegraf/issues/events{/number}","events_url":"https://api.github.com/repos/srfraser/telegraf/events","assignees_url":"https://api.github.com/repos/srfraser/telegraf/assignees{/user}","branches_url":"https://api.github.com/repos/srfraser/telegraf/branches{/branch}","tags_url":"https://api.github.com/repos/srfraser/telegraf/tags","blobs_url":"https://api.github.com/repos/srfraser/telegraf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/srfraser/telegraf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/srfraser/telegraf/git/refs{/sha}","trees_url":"https://api.github.com/repos/srfraser/telegraf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/srfraser/telegraf/statuses/{sha}","languages_url":"https://api.github.com/repos/srfraser/telegraf/languages","stargazers_url":"https://api.github.com/repos/srfraser/telegraf/stargazers","contributors_url":"https://api.github.com/repos/srfraser/telegraf/contributors","subscribers_url":"https://api.github.com/repos/srfraser/telegraf/subscribers","subscription_url":"https://api.github.com/repos/srfraser/telegraf/subscription","commits_url":"https://api.github.com/repos/srfraser/telegraf/commits{/sha}","git_commits_url":"https://api.github.com/repos/srfraser/telegraf/git/commits{/sha}","comments_url":"https://api.github.com/repos/srfraser/telegraf/comments{/number}","issue_comment_url":"https://api.github.com/repos/srfraser/telegraf/issues/comments{/number}","contents_url":"https://api.github.com/repos/srfraser/telegraf/contents/{+path}","compare_url":"https://api.github.com/repos/srfraser/telegraf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/srfraser/telegraf/merges","archive_url":"https://api.github.com/repos/srfraser/telegraf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/srfraser/telegraf/downloads","issues_url":"https://api.github.com/repos/srfraser/telegraf/issues{/number}","pulls_url":"https://api.github.com/repos/srfraser/telegraf/pulls{/number}","milestones_url":"https://api.github.com/repos/srfraser/telegraf/milestones{/number}","notifications_url":"https://api.github.com/repos/srfraser/telegraf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/srfraser/telegraf/labels{/name}","releases_url":"https://api.github.com/repos/srfraser/telegraf/releases{/id}","created_at":"2015-07-29T15:43:05Z","updated_at":"2015-07-29T15:43:06Z","pushed_at":"2015-07-30T16:37:00Z","git_url":"git://github.com/srfraser/telegraf.git","ssh_url":"git@github.com:srfraser/telegraf.git","clone_url":"https://github.com/srfraser/telegraf.git","svn_url":"https://github.com/srfraser/telegraf","homepage":"","size":1034,"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":"influxdb:master","ref":"master","sha":"6eb4bdcf0e6adbd72ea10200ae59c7470806fa95","user":{"login":"influxdb","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdb","html_url":"https://github.com/influxdb","followers_url":"https://api.github.com/users/influxdb/followers","following_url":"https://api.github.com/users/influxdb/following{/other_user}","gists_url":"https://api.github.com/users/influxdb/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdb/subscriptions","organizations_url":"https://api.github.com/users/influxdb/orgs","repos_url":"https://api.github.com/users/influxdb/repos","events_url":"https://api.github.com/users/influxdb/events{/privacy}","received_events_url":"https://api.github.com/users/influxdb/received_events","type":"Organization","site_admin":false},"repo":{"id":33258973,"name":"telegraf","full_name":"influxdb/telegraf","owner":{"login":"influxdb","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdb","html_url":"https://github.com/influxdb","followers_url":"https://api.github.com/users/influxdb/followers","following_url":"https://api.github.com/users/influxdb/following{/other_user}","gists_url":"https://api.github.com/users/influxdb/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdb/subscriptions","organizations_url":"https://api.github.com/users/influxdb/orgs","repos_url":"https://api.github.com/users/influxdb/repos","events_url":"https://api.github.com/users/influxdb/events{/privacy}","received_events_url":"https://api.github.com/users/influxdb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/influxdb/telegraf","description":"The plugin-driven server agent for reporting metrics into InfluxDB.","fork":false,"url":"https://api.github.com/repos/influxdb/telegraf","forks_url":"https://api.github.com/repos/influxdb/telegraf/forks","keys_url":"https://api.github.com/repos/influxdb/telegraf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/influxdb/telegraf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/influxdb/telegraf/teams","hooks_url":"https://api.github.com/repos/influxdb/telegraf/hooks","issue_events_url":"https://api.github.com/repos/influxdb/telegraf/issues/events{/number}","events_url":"https://api.github.com/repos/influxdb/telegraf/events","assignees_url":"https://api.github.com/repos/influxdb/telegraf/assignees{/user}","branches_url":"https://api.github.com/repos/influxdb/telegraf/branches{/branch}","tags_url":"https://api.github.com/repos/influxdb/telegraf/tags","blobs_url":"https://api.github.com/repos/influxdb/telegraf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/influxdb/telegraf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/influxdb/telegraf/git/refs{/sha}","trees_url":"https://api.github.com/repos/influxdb/telegraf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/influxdb/telegraf/statuses/{sha}","languages_url":"https://api.github.com/repos/influxdb/telegraf/languages","stargazers_url":"https://api.github.com/repos/influxdb/telegraf/stargazers","contributors_url":"https://api.github.com/repos/influxdb/telegraf/contributors","subscribers_url":"https://api.github.com/repos/influxdb/telegraf/subscribers","subscription_url":"https://api.github.com/repos/influxdb/telegraf/subscription","commits_url":"https://api.github.com/repos/influxdb/telegraf/commits{/sha}","git_commits_url":"https://api.github.com/repos/influxdb/telegraf/git/commits{/sha}","comments_url":"https://api.github.com/repos/influxdb/telegraf/comments{/number}","issue_comment_url":"https://api.github.com/repos/influxdb/telegraf/issues/comments{/number}","contents_url":"https://api.github.com/repos/influxdb/telegraf/contents/{+path}","compare_url":"https://api.github.com/repos/influxdb/telegraf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/influxdb/telegraf/merges","archive_url":"https://api.github.com/repos/influxdb/telegraf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/influxdb/telegraf/downloads","issues_url":"https://api.github.com/repos/influxdb/telegraf/issues{/number}","pulls_url":"https://api.github.com/repos/influxdb/telegraf/pulls{/number}","milestones_url":"https://api.github.com/repos/influxdb/telegraf/milestones{/number}","notifications_url":"https://api.github.com/repos/influxdb/telegraf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/influxdb/telegraf/labels{/name}","releases_url":"https://api.github.com/repos/influxdb/telegraf/releases{/id}","created_at":"2015-04-01T16:28:44Z","updated_at":"2015-07-31T07:53:18Z","pushed_at":"2015-07-30T23:29:44Z","git_url":"git://github.com/influxdb/telegraf.git","ssh_url":"git@github.com:influxdb/telegraf.git","clone_url":"https://github.com/influxdb/telegraf.git","svn_url":"https://github.com/influxdb/telegraf","homepage":"","size":1034,"stargazers_count":361,"watchers_count":361,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":50,"mirror_url":null,"open_issues_count":30,"forks":50,"open_issues":30,"watchers":361,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/influxdb/telegraf/pulls/81"},"html":{"href":"https://github.com/influxdb/telegraf/pull/81"},"issue":{"href":"https://api.github.com/repos/influxdb/telegraf/issues/81"},"comments":{"href":"https://api.github.com/repos/influxdb/telegraf/issues/81/comments"},"review_comments":{"href":"https://api.github.com/repos/influxdb/telegraf/pulls/81/comments"},"review_comment":{"href":"https://api.github.com/repos/influxdb/telegraf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/influxdb/telegraf/pulls/81/commits"},"statuses":{"href":"https://api.github.com/repos/influxdb/telegraf/statuses/8a99b9216d08292fba84ec53777fe66437b0b88c"}}}}