{"action":"created","comment":{"url":"https://api.github.com/repos/samalba/dockerclient/pulls/comments/30466989","id":30466989,"diff_hunk":"@@ -212,6 +212,50 @@ func (client *DockerClient) ContainerChanges(id string) ([]*ContainerChanges, er\n \treturn changes, nil\n }\n \n+func (client *DockerClient) readJSONStream(stream io.ReadCloser, decode func(*json.Decoder) decodingResult) (<-chan decodingResult, chan<- struct{}) {","path":"dockerclient.go","position":4,"original_position":4,"commit_id":"ae3186353c165a81a4e5ce2eb9bed3230ffb98de","original_commit_id":"ae3186353c165a81a4e5ce2eb9bed3230ffb98de","user":{"login":"aluzzardi","id":179503,"avatar_url":"https://avatars.githubusercontent.com/u/179503?v=3","gravatar_id":"","url":"https://api.github.com/users/aluzzardi","html_url":"https://github.com/aluzzardi","followers_url":"https://api.github.com/users/aluzzardi/followers","following_url":"https://api.github.com/users/aluzzardi/following{/other_user}","gists_url":"https://api.github.com/users/aluzzardi/gists{/gist_id}","starred_url":"https://api.github.com/users/aluzzardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aluzzardi/subscriptions","organizations_url":"https://api.github.com/users/aluzzardi/orgs","repos_url":"https://api.github.com/users/aluzzardi/repos","events_url":"https://api.github.com/users/aluzzardi/events{/privacy}","received_events_url":"https://api.github.com/users/aluzzardi/received_events","type":"User","site_admin":false},"body":"Couldn't this reuse or get merged with `getEvents`?","created_at":"2015-05-17T03:14:27Z","updated_at":"2015-05-17T03:14:27Z","html_url":"https://github.com/samalba/dockerclient/pull/90#discussion_r30466989","pull_request_url":"https://api.github.com/repos/samalba/dockerclient/pulls/90","_links":{"self":{"href":"https://api.github.com/repos/samalba/dockerclient/pulls/comments/30466989"},"html":{"href":"https://github.com/samalba/dockerclient/pull/90#discussion_r30466989"},"pull_request":{"href":"https://api.github.com/repos/samalba/dockerclient/pulls/90"}}},"pull_request":{"url":"https://api.github.com/repos/samalba/dockerclient/pulls/90","id":33080336,"html_url":"https://github.com/samalba/dockerclient/pull/90","diff_url":"https://github.com/samalba/dockerclient/pull/90.diff","patch_url":"https://github.com/samalba/dockerclient/pull/90.patch","issue_url":"https://api.github.com/repos/samalba/dockerclient/issues/90","number":90,"state":"open","locked":false,"title":"add MonitorEvents which returns channels","user":{"login":"donhcd","id":902007,"avatar_url":"https://avatars.githubusercontent.com/u/902007?v=3","gravatar_id":"","url":"https://api.github.com/users/donhcd","html_url":"https://github.com/donhcd","followers_url":"https://api.github.com/users/donhcd/followers","following_url":"https://api.github.com/users/donhcd/following{/other_user}","gists_url":"https://api.github.com/users/donhcd/gists{/gist_id}","starred_url":"https://api.github.com/users/donhcd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donhcd/subscriptions","organizations_url":"https://api.github.com/users/donhcd/orgs","repos_url":"https://api.github.com/users/donhcd/repos","events_url":"https://api.github.com/users/donhcd/events{/privacy}","received_events_url":"https://api.github.com/users/donhcd/received_events","type":"User","site_admin":false},"body":"the old MonitorEvents interface which involves callbacks is impossible to mock, which makes testing difficult. Returning channels fixes this.","created_at":"2015-04-10T20:24:49Z","updated_at":"2015-05-17T03:14:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af891931b9f7c1af1f8b783deb3c2ba4f4401a8e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/samalba/dockerclient/pulls/90/commits","review_comments_url":"https://api.github.com/repos/samalba/dockerclient/pulls/90/comments","review_comment_url":"https://api.github.com/repos/samalba/dockerclient/pulls/comments{/number}","comments_url":"https://api.github.com/repos/samalba/dockerclient/issues/90/comments","statuses_url":"https://api.github.com/repos/samalba/dockerclient/statuses/ae3186353c165a81a4e5ce2eb9bed3230ffb98de","head":{"label":"donhcd:betterMonitorEventsPR","ref":"betterMonitorEventsPR","sha":"ae3186353c165a81a4e5ce2eb9bed3230ffb98de","user":{"login":"donhcd","id":902007,"avatar_url":"https://avatars.githubusercontent.com/u/902007?v=3","gravatar_id":"","url":"https://api.github.com/users/donhcd","html_url":"https://github.com/donhcd","followers_url":"https://api.github.com/users/donhcd/followers","following_url":"https://api.github.com/users/donhcd/following{/other_user}","gists_url":"https://api.github.com/users/donhcd/gists{/gist_id}","starred_url":"https://api.github.com/users/donhcd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donhcd/subscriptions","organizations_url":"https://api.github.com/users/donhcd/orgs","repos_url":"https://api.github.com/users/donhcd/repos","events_url":"https://api.github.com/users/donhcd/events{/privacy}","received_events_url":"https://api.github.com/users/donhcd/received_events","type":"User","site_admin":false},"repo":{"id":26459261,"name":"dockerclient","full_name":"donhcd/dockerclient","owner":{"login":"donhcd","id":902007,"avatar_url":"https://avatars.githubusercontent.com/u/902007?v=3","gravatar_id":"","url":"https://api.github.com/users/donhcd","html_url":"https://github.com/donhcd","followers_url":"https://api.github.com/users/donhcd/followers","following_url":"https://api.github.com/users/donhcd/following{/other_user}","gists_url":"https://api.github.com/users/donhcd/gists{/gist_id}","starred_url":"https://api.github.com/users/donhcd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donhcd/subscriptions","organizations_url":"https://api.github.com/users/donhcd/orgs","repos_url":"https://api.github.com/users/donhcd/repos","events_url":"https://api.github.com/users/donhcd/events{/privacy}","received_events_url":"https://api.github.com/users/donhcd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/donhcd/dockerclient","description":"Docker client library in Go","fork":true,"url":"https://api.github.com/repos/donhcd/dockerclient","forks_url":"https://api.github.com/repos/donhcd/dockerclient/forks","keys_url":"https://api.github.com/repos/donhcd/dockerclient/keys{/key_id}","collaborators_url":"https://api.github.com/repos/donhcd/dockerclient/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/donhcd/dockerclient/teams","hooks_url":"https://api.github.com/repos/donhcd/dockerclient/hooks","issue_events_url":"https://api.github.com/repos/donhcd/dockerclient/issues/events{/number}","events_url":"https://api.github.com/repos/donhcd/dockerclient/events","assignees_url":"https://api.github.com/repos/donhcd/dockerclient/assignees{/user}","branches_url":"https://api.github.com/repos/donhcd/dockerclient/branches{/branch}","tags_url":"https://api.github.com/repos/donhcd/dockerclient/tags","blobs_url":"https://api.github.com/repos/donhcd/dockerclient/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/donhcd/dockerclient/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/donhcd/dockerclient/git/refs{/sha}","trees_url":"https://api.github.com/repos/donhcd/dockerclient/git/trees{/sha}","statuses_url":"https://api.github.com/repos/donhcd/dockerclient/statuses/{sha}","languages_url":"https://api.github.com/repos/donhcd/dockerclient/languages","stargazers_url":"https://api.github.com/repos/donhcd/dockerclient/stargazers","contributors_url":"https://api.github.com/repos/donhcd/dockerclient/contributors","subscribers_url":"https://api.github.com/repos/donhcd/dockerclient/subscribers","subscription_url":"https://api.github.com/repos/donhcd/dockerclient/subscription","commits_url":"https://api.github.com/repos/donhcd/dockerclient/commits{/sha}","git_commits_url":"https://api.github.com/repos/donhcd/dockerclient/git/commits{/sha}","comments_url":"https://api.github.com/repos/donhcd/dockerclient/comments{/number}","issue_comment_url":"https://api.github.com/repos/donhcd/dockerclient/issues/comments{/number}","contents_url":"https://api.github.com/repos/donhcd/dockerclient/contents/{+path}","compare_url":"https://api.github.com/repos/donhcd/dockerclient/compare/{base}...{head}","merges_url":"https://api.github.com/repos/donhcd/dockerclient/merges","archive_url":"https://api.github.com/repos/donhcd/dockerclient/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/donhcd/dockerclient/downloads","issues_url":"https://api.github.com/repos/donhcd/dockerclient/issues{/number}","pulls_url":"https://api.github.com/repos/donhcd/dockerclient/pulls{/number}","milestones_url":"https://api.github.com/repos/donhcd/dockerclient/milestones{/number}","notifications_url":"https://api.github.com/repos/donhcd/dockerclient/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/donhcd/dockerclient/labels{/name}","releases_url":"https://api.github.com/repos/donhcd/dockerclient/releases{/id}","created_at":"2014-11-10T22:40:47Z","updated_at":"2015-04-15T19:21:36Z","pushed_at":"2015-05-12T22:27:55Z","git_url":"git://github.com/donhcd/dockerclient.git","ssh_url":"git@github.com:donhcd/dockerclient.git","clone_url":"https://github.com/donhcd/dockerclient.git","svn_url":"https://github.com/donhcd/dockerclient","homepage":"http://www.docker.com/","size":562,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"samalba:master","ref":"master","sha":"4e6f4a21c07510dd6446d28053351a275591f08d","user":{"login":"samalba","id":216487,"avatar_url":"https://avatars.githubusercontent.com/u/216487?v=3","gravatar_id":"","url":"https://api.github.com/users/samalba","html_url":"https://github.com/samalba","followers_url":"https://api.github.com/users/samalba/followers","following_url":"https://api.github.com/users/samalba/following{/other_user}","gists_url":"https://api.github.com/users/samalba/gists{/gist_id}","starred_url":"https://api.github.com/users/samalba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samalba/subscriptions","organizations_url":"https://api.github.com/users/samalba/orgs","repos_url":"https://api.github.com/users/samalba/repos","events_url":"https://api.github.com/users/samalba/events{/privacy}","received_events_url":"https://api.github.com/users/samalba/received_events","type":"User","site_admin":false},"repo":{"id":15388290,"name":"dockerclient","full_name":"samalba/dockerclient","owner":{"login":"samalba","id":216487,"avatar_url":"https://avatars.githubusercontent.com/u/216487?v=3","gravatar_id":"","url":"https://api.github.com/users/samalba","html_url":"https://github.com/samalba","followers_url":"https://api.github.com/users/samalba/followers","following_url":"https://api.github.com/users/samalba/following{/other_user}","gists_url":"https://api.github.com/users/samalba/gists{/gist_id}","starred_url":"https://api.github.com/users/samalba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samalba/subscriptions","organizations_url":"https://api.github.com/users/samalba/orgs","repos_url":"https://api.github.com/users/samalba/repos","events_url":"https://api.github.com/users/samalba/events{/privacy}","received_events_url":"https://api.github.com/users/samalba/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samalba/dockerclient","description":"Docker client library in Go","fork":false,"url":"https://api.github.com/repos/samalba/dockerclient","forks_url":"https://api.github.com/repos/samalba/dockerclient/forks","keys_url":"https://api.github.com/repos/samalba/dockerclient/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samalba/dockerclient/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samalba/dockerclient/teams","hooks_url":"https://api.github.com/repos/samalba/dockerclient/hooks","issue_events_url":"https://api.github.com/repos/samalba/dockerclient/issues/events{/number}","events_url":"https://api.github.com/repos/samalba/dockerclient/events","assignees_url":"https://api.github.com/repos/samalba/dockerclient/assignees{/user}","branches_url":"https://api.github.com/repos/samalba/dockerclient/branches{/branch}","tags_url":"https://api.github.com/repos/samalba/dockerclient/tags","blobs_url":"https://api.github.com/repos/samalba/dockerclient/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samalba/dockerclient/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samalba/dockerclient/git/refs{/sha}","trees_url":"https://api.github.com/repos/samalba/dockerclient/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samalba/dockerclient/statuses/{sha}","languages_url":"https://api.github.com/repos/samalba/dockerclient/languages","stargazers_url":"https://api.github.com/repos/samalba/dockerclient/stargazers","contributors_url":"https://api.github.com/repos/samalba/dockerclient/contributors","subscribers_url":"https://api.github.com/repos/samalba/dockerclient/subscribers","subscription_url":"https://api.github.com/repos/samalba/dockerclient/subscription","commits_url":"https://api.github.com/repos/samalba/dockerclient/commits{/sha}","git_commits_url":"https://api.github.com/repos/samalba/dockerclient/git/commits{/sha}","comments_url":"https://api.github.com/repos/samalba/dockerclient/comments{/number}","issue_comment_url":"https://api.github.com/repos/samalba/dockerclient/issues/comments{/number}","contents_url":"https://api.github.com/repos/samalba/dockerclient/contents/{+path}","compare_url":"https://api.github.com/repos/samalba/dockerclient/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samalba/dockerclient/merges","archive_url":"https://api.github.com/repos/samalba/dockerclient/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samalba/dockerclient/downloads","issues_url":"https://api.github.com/repos/samalba/dockerclient/issues{/number}","pulls_url":"https://api.github.com/repos/samalba/dockerclient/pulls{/number}","milestones_url":"https://api.github.com/repos/samalba/dockerclient/milestones{/number}","notifications_url":"https://api.github.com/repos/samalba/dockerclient/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samalba/dockerclient/labels{/name}","releases_url":"https://api.github.com/repos/samalba/dockerclient/releases{/id}","created_at":"2013-12-23T05:26:10Z","updated_at":"2015-05-16T16:34:15Z","pushed_at":"2015-05-14T06:48:20Z","git_url":"git://github.com/samalba/dockerclient.git","ssh_url":"git@github.com:samalba/dockerclient.git","clone_url":"https://github.com/samalba/dockerclient.git","svn_url":"https://github.com/samalba/dockerclient","homepage":"http://www.docker.com/","size":1510,"stargazers_count":146,"watchers_count":146,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":66,"mirror_url":null,"open_issues_count":25,"forks":66,"open_issues":25,"watchers":146,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/samalba/dockerclient/pulls/90"},"html":{"href":"https://github.com/samalba/dockerclient/pull/90"},"issue":{"href":"https://api.github.com/repos/samalba/dockerclient/issues/90"},"comments":{"href":"https://api.github.com/repos/samalba/dockerclient/issues/90/comments"},"review_comments":{"href":"https://api.github.com/repos/samalba/dockerclient/pulls/90/comments"},"review_comment":{"href":"https://api.github.com/repos/samalba/dockerclient/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/samalba/dockerclient/pulls/90/commits"},"statuses":{"href":"https://api.github.com/repos/samalba/dockerclient/statuses/ae3186353c165a81a4e5ce2eb9bed3230ffb98de"}}}}