{"action":"opened","number":1,"pull_request":{"url":"https://api.github.com/repos/djherbis/nio/pulls/1","id":64333703,"html_url":"https://github.com/djherbis/nio/pull/1","diff_url":"https://github.com/djherbis/nio/pull/1.diff","patch_url":"https://github.com/djherbis/nio/pull/1.patch","issue_url":"https://api.github.com/repos/djherbis/nio/issues/1","number":1,"state":"open","locked":false,"title":"Expose Pipe{Reader|Writer} and their Close[WithError] methods, like io.Pipe","user":{"login":"FiloSottile","id":1225294,"avatar_url":"https://avatars.githubusercontent.com/u/1225294?v=3","gravatar_id":"","url":"https://api.github.com/users/FiloSottile","html_url":"https://github.com/FiloSottile","followers_url":"https://api.github.com/users/FiloSottile/followers","following_url":"https://api.github.com/users/FiloSottile/following{/other_user}","gists_url":"https://api.github.com/users/FiloSottile/gists{/gist_id}","starred_url":"https://api.github.com/users/FiloSottile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FiloSottile/subscriptions","organizations_url":"https://api.github.com/users/FiloSottile/orgs","repos_url":"https://api.github.com/users/FiloSottile/repos","events_url":"https://api.github.com/users/FiloSottile/events{/privacy}","received_events_url":"https://api.github.com/users/FiloSottile/received_events","type":"User","site_admin":false},"body":"This allows library users to access the Close methods without funny interface assertions, and replicate functionality similar (but not identical) to NewReader.  It also mirrors the io.Pipe implementation, and follows the general best practice of returning concretes instead of interfaces.\r\n\r\nThis does change an exposed API, but in such a way that should not break most existing code, as shown by the unchanged tests.\r\n\r\nFor example, this lets me do this:\r\n\r\n```go\r\n\t// Concurrently download the archive to a memory buffer of 1MB chunks\r\n\tbuf := buffer.NewPartition(buffer.NewMemPool(1024 * 1024))\r\n\tpr, pw := nio.Pipe(buf)\r\n\tgo func() {\r\n\t\t_, err := io.Copy(pw, r.Body)\r\n\t\tpw.CloseWithError(err)\r\n\t\tr.Body.Close()\r\n\t}()\r\n\treturn pr, nil\r\n```\r\n\r\nBy the way, thanks a lot for the library, I was about to reimplement the exact same thing.","created_at":"2016-03-28T15:30:28Z","updated_at":"2016-03-28T15:30:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/djherbis/nio/pulls/1/commits","review_comments_url":"https://api.github.com/repos/djherbis/nio/pulls/1/comments","review_comment_url":"https://api.github.com/repos/djherbis/nio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/djherbis/nio/issues/1/comments","statuses_url":"https://api.github.com/repos/djherbis/nio/statuses/3c984025b3724622c9ae6b9e5838179105e76c74","head":{"label":"FiloSottile:master","ref":"master","sha":"3c984025b3724622c9ae6b9e5838179105e76c74","user":{"login":"FiloSottile","id":1225294,"avatar_url":"https://avatars.githubusercontent.com/u/1225294?v=3","gravatar_id":"","url":"https://api.github.com/users/FiloSottile","html_url":"https://github.com/FiloSottile","followers_url":"https://api.github.com/users/FiloSottile/followers","following_url":"https://api.github.com/users/FiloSottile/following{/other_user}","gists_url":"https://api.github.com/users/FiloSottile/gists{/gist_id}","starred_url":"https://api.github.com/users/FiloSottile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FiloSottile/subscriptions","organizations_url":"https://api.github.com/users/FiloSottile/orgs","repos_url":"https://api.github.com/users/FiloSottile/repos","events_url":"https://api.github.com/users/FiloSottile/events{/privacy}","received_events_url":"https://api.github.com/users/FiloSottile/received_events","type":"User","site_admin":false},"repo":{"id":54901724,"name":"nio","full_name":"FiloSottile/nio","owner":{"login":"FiloSottile","id":1225294,"avatar_url":"https://avatars.githubusercontent.com/u/1225294?v=3","gravatar_id":"","url":"https://api.github.com/users/FiloSottile","html_url":"https://github.com/FiloSottile","followers_url":"https://api.github.com/users/FiloSottile/followers","following_url":"https://api.github.com/users/FiloSottile/following{/other_user}","gists_url":"https://api.github.com/users/FiloSottile/gists{/gist_id}","starred_url":"https://api.github.com/users/FiloSottile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FiloSottile/subscriptions","organizations_url":"https://api.github.com/users/FiloSottile/orgs","repos_url":"https://api.github.com/users/FiloSottile/repos","events_url":"https://api.github.com/users/FiloSottile/events{/privacy}","received_events_url":"https://api.github.com/users/FiloSottile/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/FiloSottile/nio","description":"Concurrent Buffered IO in Go #golang","fork":true,"url":"https://api.github.com/repos/FiloSottile/nio","forks_url":"https://api.github.com/repos/FiloSottile/nio/forks","keys_url":"https://api.github.com/repos/FiloSottile/nio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FiloSottile/nio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FiloSottile/nio/teams","hooks_url":"https://api.github.com/repos/FiloSottile/nio/hooks","issue_events_url":"https://api.github.com/repos/FiloSottile/nio/issues/events{/number}","events_url":"https://api.github.com/repos/FiloSottile/nio/events","assignees_url":"https://api.github.com/repos/FiloSottile/nio/assignees{/user}","branches_url":"https://api.github.com/repos/FiloSottile/nio/branches{/branch}","tags_url":"https://api.github.com/repos/FiloSottile/nio/tags","blobs_url":"https://api.github.com/repos/FiloSottile/nio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FiloSottile/nio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FiloSottile/nio/git/refs{/sha}","trees_url":"https://api.github.com/repos/FiloSottile/nio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FiloSottile/nio/statuses/{sha}","languages_url":"https://api.github.com/repos/FiloSottile/nio/languages","stargazers_url":"https://api.github.com/repos/FiloSottile/nio/stargazers","contributors_url":"https://api.github.com/repos/FiloSottile/nio/contributors","subscribers_url":"https://api.github.com/repos/FiloSottile/nio/subscribers","subscription_url":"https://api.github.com/repos/FiloSottile/nio/subscription","commits_url":"https://api.github.com/repos/FiloSottile/nio/commits{/sha}","git_commits_url":"https://api.github.com/repos/FiloSottile/nio/git/commits{/sha}","comments_url":"https://api.github.com/repos/FiloSottile/nio/comments{/number}","issue_comment_url":"https://api.github.com/repos/FiloSottile/nio/issues/comments{/number}","contents_url":"https://api.github.com/repos/FiloSottile/nio/contents/{+path}","compare_url":"https://api.github.com/repos/FiloSottile/nio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FiloSottile/nio/merges","archive_url":"https://api.github.com/repos/FiloSottile/nio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FiloSottile/nio/downloads","issues_url":"https://api.github.com/repos/FiloSottile/nio/issues{/number}","pulls_url":"https://api.github.com/repos/FiloSottile/nio/pulls{/number}","milestones_url":"https://api.github.com/repos/FiloSottile/nio/milestones{/number}","notifications_url":"https://api.github.com/repos/FiloSottile/nio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FiloSottile/nio/labels{/name}","releases_url":"https://api.github.com/repos/FiloSottile/nio/releases{/id}","deployments_url":"https://api.github.com/repos/FiloSottile/nio/deployments","created_at":"2016-03-28T15:23:02Z","updated_at":"2016-03-28T15:23:03Z","pushed_at":"2016-03-28T15:28:50Z","git_url":"git://github.com/FiloSottile/nio.git","ssh_url":"git@github.com:FiloSottile/nio.git","clone_url":"https://github.com/FiloSottile/nio.git","svn_url":"https://github.com/FiloSottile/nio","homepage":"","size":36,"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":"djherbis:master","ref":"master","sha":"27485e9ceb3dd1c5002efdc3c3acee20a4324d77","user":{"login":"djherbis","id":1535210,"avatar_url":"https://avatars.githubusercontent.com/u/1535210?v=3","gravatar_id":"","url":"https://api.github.com/users/djherbis","html_url":"https://github.com/djherbis","followers_url":"https://api.github.com/users/djherbis/followers","following_url":"https://api.github.com/users/djherbis/following{/other_user}","gists_url":"https://api.github.com/users/djherbis/gists{/gist_id}","starred_url":"https://api.github.com/users/djherbis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djherbis/subscriptions","organizations_url":"https://api.github.com/users/djherbis/orgs","repos_url":"https://api.github.com/users/djherbis/repos","events_url":"https://api.github.com/users/djherbis/events{/privacy}","received_events_url":"https://api.github.com/users/djherbis/received_events","type":"User","site_admin":false},"repo":{"id":25948319,"name":"nio","full_name":"djherbis/nio","owner":{"login":"djherbis","id":1535210,"avatar_url":"https://avatars.githubusercontent.com/u/1535210?v=3","gravatar_id":"","url":"https://api.github.com/users/djherbis","html_url":"https://github.com/djherbis","followers_url":"https://api.github.com/users/djherbis/followers","following_url":"https://api.github.com/users/djherbis/following{/other_user}","gists_url":"https://api.github.com/users/djherbis/gists{/gist_id}","starred_url":"https://api.github.com/users/djherbis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djherbis/subscriptions","organizations_url":"https://api.github.com/users/djherbis/orgs","repos_url":"https://api.github.com/users/djherbis/repos","events_url":"https://api.github.com/users/djherbis/events{/privacy}","received_events_url":"https://api.github.com/users/djherbis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/djherbis/nio","description":"Concurrent Buffered IO in Go #golang","fork":false,"url":"https://api.github.com/repos/djherbis/nio","forks_url":"https://api.github.com/repos/djherbis/nio/forks","keys_url":"https://api.github.com/repos/djherbis/nio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/djherbis/nio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/djherbis/nio/teams","hooks_url":"https://api.github.com/repos/djherbis/nio/hooks","issue_events_url":"https://api.github.com/repos/djherbis/nio/issues/events{/number}","events_url":"https://api.github.com/repos/djherbis/nio/events","assignees_url":"https://api.github.com/repos/djherbis/nio/assignees{/user}","branches_url":"https://api.github.com/repos/djherbis/nio/branches{/branch}","tags_url":"https://api.github.com/repos/djherbis/nio/tags","blobs_url":"https://api.github.com/repos/djherbis/nio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/djherbis/nio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/djherbis/nio/git/refs{/sha}","trees_url":"https://api.github.com/repos/djherbis/nio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/djherbis/nio/statuses/{sha}","languages_url":"https://api.github.com/repos/djherbis/nio/languages","stargazers_url":"https://api.github.com/repos/djherbis/nio/stargazers","contributors_url":"https://api.github.com/repos/djherbis/nio/contributors","subscribers_url":"https://api.github.com/repos/djherbis/nio/subscribers","subscription_url":"https://api.github.com/repos/djherbis/nio/subscription","commits_url":"https://api.github.com/repos/djherbis/nio/commits{/sha}","git_commits_url":"https://api.github.com/repos/djherbis/nio/git/commits{/sha}","comments_url":"https://api.github.com/repos/djherbis/nio/comments{/number}","issue_comment_url":"https://api.github.com/repos/djherbis/nio/issues/comments{/number}","contents_url":"https://api.github.com/repos/djherbis/nio/contents/{+path}","compare_url":"https://api.github.com/repos/djherbis/nio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/djherbis/nio/merges","archive_url":"https://api.github.com/repos/djherbis/nio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/djherbis/nio/downloads","issues_url":"https://api.github.com/repos/djherbis/nio/issues{/number}","pulls_url":"https://api.github.com/repos/djherbis/nio/pulls{/number}","milestones_url":"https://api.github.com/repos/djherbis/nio/milestones{/number}","notifications_url":"https://api.github.com/repos/djherbis/nio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/djherbis/nio/labels{/name}","releases_url":"https://api.github.com/repos/djherbis/nio/releases{/id}","deployments_url":"https://api.github.com/repos/djherbis/nio/deployments","created_at":"2014-10-30T00:54:20Z","updated_at":"2016-03-28T14:42:10Z","pushed_at":"2016-02-11T03:11:01Z","git_url":"git://github.com/djherbis/nio.git","ssh_url":"git@github.com:djherbis/nio.git","clone_url":"https://github.com/djherbis/nio.git","svn_url":"https://github.com/djherbis/nio","homepage":"","size":35,"stargazers_count":28,"watchers_count":28,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/djherbis/nio/pulls/1"},"html":{"href":"https://github.com/djherbis/nio/pull/1"},"issue":{"href":"https://api.github.com/repos/djherbis/nio/issues/1"},"comments":{"href":"https://api.github.com/repos/djherbis/nio/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/djherbis/nio/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/djherbis/nio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/djherbis/nio/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/djherbis/nio/statuses/3c984025b3724622c9ae6b9e5838179105e76c74"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":39,"deletions":39,"changed_files":2}}