{"action":"created","comment":{"url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/pulls/comments/143473482","pull_request_review_id":67989678,"id":143473482,"diff_hunk":"@@ -0,0 +1,64 @@\n+package main\n+\n+import (\n+\t\"errors\"\n+\t\"fmt\"\n+\t\"io\"\n+\t\"os\"\n+)\n+\n+type body struct {\n+\tFile   *os.File\n+\tReader io.Reader\n+\tOffset int64\n+\tSize   int64\n+}\n+\n+// Create a body.  A body is an io.Reader instance which reads from the file at\n+// filename, starting at the `offset`th byte and reading up to `size` bytes in\n+// total.\n+func newBody(filename string, offset, size int64) (*body, error) {\n+\tif size == 0 {\n+\t\treturn nil, errors.New(\"Cannot specify a size of 0\")","path":"body.go","position":22,"original_position":22,"commit_id":"e4f46d36240d4c840c7a2d58be3e8937578197ae","original_commit_id":"e4f46d36240d4c840c7a2d58be3e8937578197ae","user":{"login":"jhford","id":607353,"avatar_url":"https://avatars3.githubusercontent.com/u/607353?v=4","gravatar_id":"","url":"https://api.github.com/users/jhford","html_url":"https://github.com/jhford","followers_url":"https://api.github.com/users/jhford/followers","following_url":"https://api.github.com/users/jhford/following{/other_user}","gists_url":"https://api.github.com/users/jhford/gists{/gist_id}","starred_url":"https://api.github.com/users/jhford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhford/subscriptions","organizations_url":"https://api.github.com/users/jhford/orgs","repos_url":"https://api.github.com/users/jhford/repos","events_url":"https://api.github.com/users/jhford/events{/privacy}","received_events_url":"https://api.github.com/users/jhford/received_events","type":"User","site_admin":false},"body":":'( I'm sure not a fan of error handling in Go, but that's a good suggestion.","created_at":"2017-10-09T13:53:17Z","updated_at":"2017-10-09T13:53:17Z","html_url":"https://github.com/taskcluster/taskcluster-lib-artifact-go/pull/1#discussion_r143473482","pull_request_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/pulls/1","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/pulls/comments/143473482"},"html":{"href":"https://github.com/taskcluster/taskcluster-lib-artifact-go/pull/1#discussion_r143473482"},"pull_request":{"href":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/pulls/1"}},"in_reply_to_id":142715923},"pull_request":{"url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/pulls/1","id":144221399,"html_url":"https://github.com/taskcluster/taskcluster-lib-artifact-go/pull/1","diff_url":"https://github.com/taskcluster/taskcluster-lib-artifact-go/pull/1.diff","patch_url":"https://github.com/taskcluster/taskcluster-lib-artifact-go/pull/1.patch","issue_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/issues/1","number":1,"state":"open","locked":false,"title":"Initial work","user":{"login":"jhford","id":607353,"avatar_url":"https://avatars3.githubusercontent.com/u/607353?v=4","gravatar_id":"","url":"https://api.github.com/users/jhford","html_url":"https://github.com/jhford","followers_url":"https://api.github.com/users/jhford/followers","following_url":"https://api.github.com/users/jhford/following{/other_user}","gists_url":"https://api.github.com/users/jhford/gists{/gist_id}","starred_url":"https://api.github.com/users/jhford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhford/subscriptions","organizations_url":"https://api.github.com/users/jhford/orgs","repos_url":"https://api.github.com/users/jhford/repos","events_url":"https://api.github.com/users/jhford/events{/privacy}","received_events_url":"https://api.github.com/users/jhford/received_events","type":"User","site_admin":false},"body":"Here's the first batch of commits, but it's probably better to take a look at it as the complete diff.  The internal functions are a little bit messy, I need to work on cleaning them up a little bit.  I'd also like to change a lot of parameters to pointers so that I can specify `nil` when calling.\r\n\r\nThis PR is the underlying code that I need for the special blob artifact methods.  I will make the `createArtifact` and `completeArtifact` calls through the tcclient's Queue.  The request runner here is used to run the requests given back by the `createArtifact` method and downloads done using the artifact's get method.","created_at":"2017-10-02T16:03:17Z","updated_at":"2017-10-09T13:53:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d65ca2bc2e152f588f1b3bf4aa9816f6b072acb1","assignee":{"login":"jhford","id":607353,"avatar_url":"https://avatars3.githubusercontent.com/u/607353?v=4","gravatar_id":"","url":"https://api.github.com/users/jhford","html_url":"https://github.com/jhford","followers_url":"https://api.github.com/users/jhford/followers","following_url":"https://api.github.com/users/jhford/following{/other_user}","gists_url":"https://api.github.com/users/jhford/gists{/gist_id}","starred_url":"https://api.github.com/users/jhford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhford/subscriptions","organizations_url":"https://api.github.com/users/jhford/orgs","repos_url":"https://api.github.com/users/jhford/repos","events_url":"https://api.github.com/users/jhford/events{/privacy}","received_events_url":"https://api.github.com/users/jhford/received_events","type":"User","site_admin":false},"assignees":[{"login":"jhford","id":607353,"avatar_url":"https://avatars3.githubusercontent.com/u/607353?v=4","gravatar_id":"","url":"https://api.github.com/users/jhford","html_url":"https://github.com/jhford","followers_url":"https://api.github.com/users/jhford/followers","following_url":"https://api.github.com/users/jhford/following{/other_user}","gists_url":"https://api.github.com/users/jhford/gists{/gist_id}","starred_url":"https://api.github.com/users/jhford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhford/subscriptions","organizations_url":"https://api.github.com/users/jhford/orgs","repos_url":"https://api.github.com/users/jhford/repos","events_url":"https://api.github.com/users/jhford/events{/privacy}","received_events_url":"https://api.github.com/users/jhford/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/pulls/1/commits","review_comments_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/pulls/1/comments","review_comment_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/issues/1/comments","statuses_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/statuses/e4f46d36240d4c840c7a2d58be3e8937578197ae","head":{"label":"taskcluster:initial-work","ref":"initial-work","sha":"e4f46d36240d4c840c7a2d58be3e8937578197ae","user":{"login":"taskcluster","id":6257436,"avatar_url":"https://avatars2.githubusercontent.com/u/6257436?v=4","gravatar_id":"","url":"https://api.github.com/users/taskcluster","html_url":"https://github.com/taskcluster","followers_url":"https://api.github.com/users/taskcluster/followers","following_url":"https://api.github.com/users/taskcluster/following{/other_user}","gists_url":"https://api.github.com/users/taskcluster/gists{/gist_id}","starred_url":"https://api.github.com/users/taskcluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskcluster/subscriptions","organizations_url":"https://api.github.com/users/taskcluster/orgs","repos_url":"https://api.github.com/users/taskcluster/repos","events_url":"https://api.github.com/users/taskcluster/events{/privacy}","received_events_url":"https://api.github.com/users/taskcluster/received_events","type":"Organization","site_admin":false},"repo":{"id":100267512,"name":"taskcluster-lib-artifact-go","full_name":"taskcluster/taskcluster-lib-artifact-go","owner":{"login":"taskcluster","id":6257436,"avatar_url":"https://avatars2.githubusercontent.com/u/6257436?v=4","gravatar_id":"","url":"https://api.github.com/users/taskcluster","html_url":"https://github.com/taskcluster","followers_url":"https://api.github.com/users/taskcluster/followers","following_url":"https://api.github.com/users/taskcluster/following{/other_user}","gists_url":"https://api.github.com/users/taskcluster/gists{/gist_id}","starred_url":"https://api.github.com/users/taskcluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskcluster/subscriptions","organizations_url":"https://api.github.com/users/taskcluster/orgs","repos_url":"https://api.github.com/users/taskcluster/repos","events_url":"https://api.github.com/users/taskcluster/events{/privacy}","received_events_url":"https://api.github.com/users/taskcluster/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/taskcluster/taskcluster-lib-artifact-go","description":"An implementation of taskcluster-lib-artifact for Go","fork":false,"url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go","forks_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/forks","keys_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/teams","hooks_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/hooks","issue_events_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/issues/events{/number}","events_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/events","assignees_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/assignees{/user}","branches_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/branches{/branch}","tags_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/tags","blobs_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/statuses/{sha}","languages_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/languages","stargazers_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/stargazers","contributors_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/contributors","subscribers_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/subscribers","subscription_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/subscription","commits_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/contents/{+path}","compare_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/merges","archive_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/downloads","issues_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/issues{/number}","pulls_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/pulls{/number}","milestones_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/milestones{/number}","notifications_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/labels{/name}","releases_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/releases{/id}","deployments_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/deployments","created_at":"2017-08-14T12:55:29Z","updated_at":"2017-08-14T12:55:29Z","pushed_at":"2017-10-02T16:03:18Z","git_url":"git://github.com/taskcluster/taskcluster-lib-artifact-go.git","ssh_url":"git@github.com:taskcluster/taskcluster-lib-artifact-go.git","clone_url":"https://github.com/taskcluster/taskcluster-lib-artifact-go.git","svn_url":"https://github.com/taskcluster/taskcluster-lib-artifact-go","homepage":null,"size":44,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"taskcluster:master","ref":"master","sha":"958b77a0560b66005cac1cebd554b60d553b3e3d","user":{"login":"taskcluster","id":6257436,"avatar_url":"https://avatars2.githubusercontent.com/u/6257436?v=4","gravatar_id":"","url":"https://api.github.com/users/taskcluster","html_url":"https://github.com/taskcluster","followers_url":"https://api.github.com/users/taskcluster/followers","following_url":"https://api.github.com/users/taskcluster/following{/other_user}","gists_url":"https://api.github.com/users/taskcluster/gists{/gist_id}","starred_url":"https://api.github.com/users/taskcluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskcluster/subscriptions","organizations_url":"https://api.github.com/users/taskcluster/orgs","repos_url":"https://api.github.com/users/taskcluster/repos","events_url":"https://api.github.com/users/taskcluster/events{/privacy}","received_events_url":"https://api.github.com/users/taskcluster/received_events","type":"Organization","site_admin":false},"repo":{"id":100267512,"name":"taskcluster-lib-artifact-go","full_name":"taskcluster/taskcluster-lib-artifact-go","owner":{"login":"taskcluster","id":6257436,"avatar_url":"https://avatars2.githubusercontent.com/u/6257436?v=4","gravatar_id":"","url":"https://api.github.com/users/taskcluster","html_url":"https://github.com/taskcluster","followers_url":"https://api.github.com/users/taskcluster/followers","following_url":"https://api.github.com/users/taskcluster/following{/other_user}","gists_url":"https://api.github.com/users/taskcluster/gists{/gist_id}","starred_url":"https://api.github.com/users/taskcluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskcluster/subscriptions","organizations_url":"https://api.github.com/users/taskcluster/orgs","repos_url":"https://api.github.com/users/taskcluster/repos","events_url":"https://api.github.com/users/taskcluster/events{/privacy}","received_events_url":"https://api.github.com/users/taskcluster/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/taskcluster/taskcluster-lib-artifact-go","description":"An implementation of taskcluster-lib-artifact for Go","fork":false,"url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go","forks_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/forks","keys_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/teams","hooks_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/hooks","issue_events_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/issues/events{/number}","events_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/events","assignees_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/assignees{/user}","branches_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/branches{/branch}","tags_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/tags","blobs_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/statuses/{sha}","languages_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/languages","stargazers_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/stargazers","contributors_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/contributors","subscribers_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/subscribers","subscription_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/subscription","commits_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/contents/{+path}","compare_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/merges","archive_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/downloads","issues_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/issues{/number}","pulls_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/pulls{/number}","milestones_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/milestones{/number}","notifications_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/labels{/name}","releases_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/releases{/id}","deployments_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/deployments","created_at":"2017-08-14T12:55:29Z","updated_at":"2017-08-14T12:55:29Z","pushed_at":"2017-10-02T16:03:18Z","git_url":"git://github.com/taskcluster/taskcluster-lib-artifact-go.git","ssh_url":"git@github.com:taskcluster/taskcluster-lib-artifact-go.git","clone_url":"https://github.com/taskcluster/taskcluster-lib-artifact-go.git","svn_url":"https://github.com/taskcluster/taskcluster-lib-artifact-go","homepage":null,"size":44,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/pulls/1"},"html":{"href":"https://github.com/taskcluster/taskcluster-lib-artifact-go/pull/1"},"issue":{"href":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/issues/1"},"comments":{"href":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/taskcluster/taskcluster-lib-artifact-go/statuses/e4f46d36240d4c840c7a2d58be3e8937578197ae"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jhford"}}