{"action":"created","comment":{"url":"https://api.github.com/repos/alexkappa/errors/pulls/comments/116751897","pull_request_review_id":38395434,"id":116751897,"diff_hunk":"@@ -8,6 +8,33 @@ import (\n \t\"testing\"\n )\n \n+func TestBatchError(t *testing.T) {\n+\tbatch := NewBatch([]error{New(\"test1\"), New(\"test2\")})\n+\n+\terrors := []Error{New(\"test1\"), New(\"test2\")}\n+\n+\tfor i, r := range batch.Errors() {\n+\t\tif errors[i].Error() != r.Error() {\n+\t\t\tt.Errorf(\"expected error %q to be equal\", \"test\")\n+\t\t}\n+\t}\n+\n+\tif batch.IsEmpty() {\n+\t\tt.Error(\"expected batch to not be empty\")\n+\t}\n+\n+\tif _, ok := batch.(error); !ok {\n+\t\tt.Error(\"expected batch to be the generic error\")\n+\t}\n+\n+\te := `test1;test2`\n+\ts := batch.Error()\n+\n+\tif strings.Compare(s, e) != 0 {","path":"errors_test.go","position":26,"original_position":26,"commit_id":"705ae4b00255e616ec3b2b9f5ba8c0670feb27c3","original_commit_id":"705ae4b00255e616ec3b2b9f5ba8c0670feb27c3","user":{"login":"alexkappa","id":1204095,"avatar_url":"https://avatars3.githubusercontent.com/u/1204095?v=3","gravatar_id":"","url":"https://api.github.com/users/alexkappa","html_url":"https://github.com/alexkappa","followers_url":"https://api.github.com/users/alexkappa/followers","following_url":"https://api.github.com/users/alexkappa/following{/other_user}","gists_url":"https://api.github.com/users/alexkappa/gists{/gist_id}","starred_url":"https://api.github.com/users/alexkappa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexkappa/subscriptions","organizations_url":"https://api.github.com/users/alexkappa/orgs","repos_url":"https://api.github.com/users/alexkappa/repos","events_url":"https://api.github.com/users/alexkappa/events{/privacy}","received_events_url":"https://api.github.com/users/alexkappa/received_events","type":"User","site_admin":false},"body":"You could also use `s != e`","created_at":"2017-05-16T14:05:11Z","updated_at":"2017-05-16T14:06:25Z","html_url":"https://github.com/alexkappa/errors/pull/1#discussion_r116751897","pull_request_url":"https://api.github.com/repos/alexkappa/errors/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/alexkappa/errors/pulls/comments/116751897"},"html":{"href":"https://github.com/alexkappa/errors/pull/1#discussion_r116751897"},"pull_request":{"href":"https://api.github.com/repos/alexkappa/errors/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/alexkappa/errors/pulls/1","id":120345783,"html_url":"https://github.com/alexkappa/errors/pull/1","diff_url":"https://github.com/alexkappa/errors/pull/1.diff","patch_url":"https://github.com/alexkappa/errors/pull/1.patch","issue_url":"https://api.github.com/repos/alexkappa/errors/issues/1","number":1,"state":"open","locked":false,"title":"Add batch error","user":{"login":"RafaelReia","id":3820792,"avatar_url":"https://avatars1.githubusercontent.com/u/3820792?v=3","gravatar_id":"","url":"https://api.github.com/users/RafaelReia","html_url":"https://github.com/RafaelReia","followers_url":"https://api.github.com/users/RafaelReia/followers","following_url":"https://api.github.com/users/RafaelReia/following{/other_user}","gists_url":"https://api.github.com/users/RafaelReia/gists{/gist_id}","starred_url":"https://api.github.com/users/RafaelReia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RafaelReia/subscriptions","organizations_url":"https://api.github.com/users/RafaelReia/orgs","repos_url":"https://api.github.com/users/RafaelReia/repos","events_url":"https://api.github.com/users/RafaelReia/events{/privacy}","received_events_url":"https://api.github.com/users/RafaelReia/received_events","type":"User","site_admin":false},"body":"This PR allows the user to append a set of errors in the same Error interface.","created_at":"2017-05-12T15:16:02Z","updated_at":"2017-05-16T14:06:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74157cb8cead4adc979053010698075baff9cb93","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/alexkappa/errors/pulls/1/commits","review_comments_url":"https://api.github.com/repos/alexkappa/errors/pulls/1/comments","review_comment_url":"https://api.github.com/repos/alexkappa/errors/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alexkappa/errors/issues/1/comments","statuses_url":"https://api.github.com/repos/alexkappa/errors/statuses/705ae4b00255e616ec3b2b9f5ba8c0670feb27c3","head":{"label":"RafaelReia:addBatchError","ref":"addBatchError","sha":"705ae4b00255e616ec3b2b9f5ba8c0670feb27c3","user":{"login":"RafaelReia","id":3820792,"avatar_url":"https://avatars1.githubusercontent.com/u/3820792?v=3","gravatar_id":"","url":"https://api.github.com/users/RafaelReia","html_url":"https://github.com/RafaelReia","followers_url":"https://api.github.com/users/RafaelReia/followers","following_url":"https://api.github.com/users/RafaelReia/following{/other_user}","gists_url":"https://api.github.com/users/RafaelReia/gists{/gist_id}","starred_url":"https://api.github.com/users/RafaelReia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RafaelReia/subscriptions","organizations_url":"https://api.github.com/users/RafaelReia/orgs","repos_url":"https://api.github.com/users/RafaelReia/repos","events_url":"https://api.github.com/users/RafaelReia/events{/privacy}","received_events_url":"https://api.github.com/users/RafaelReia/received_events","type":"User","site_admin":false},"repo":{"id":90989732,"name":"errors","full_name":"RafaelReia/errors","owner":{"login":"RafaelReia","id":3820792,"avatar_url":"https://avatars1.githubusercontent.com/u/3820792?v=3","gravatar_id":"","url":"https://api.github.com/users/RafaelReia","html_url":"https://github.com/RafaelReia","followers_url":"https://api.github.com/users/RafaelReia/followers","following_url":"https://api.github.com/users/RafaelReia/following{/other_user}","gists_url":"https://api.github.com/users/RafaelReia/gists{/gist_id}","starred_url":"https://api.github.com/users/RafaelReia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RafaelReia/subscriptions","organizations_url":"https://api.github.com/users/RafaelReia/orgs","repos_url":"https://api.github.com/users/RafaelReia/repos","events_url":"https://api.github.com/users/RafaelReia/events{/privacy}","received_events_url":"https://api.github.com/users/RafaelReia/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RafaelReia/errors","description":"Similar to standard library errors but with some stack trace goodness","fork":true,"url":"https://api.github.com/repos/RafaelReia/errors","forks_url":"https://api.github.com/repos/RafaelReia/errors/forks","keys_url":"https://api.github.com/repos/RafaelReia/errors/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RafaelReia/errors/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RafaelReia/errors/teams","hooks_url":"https://api.github.com/repos/RafaelReia/errors/hooks","issue_events_url":"https://api.github.com/repos/RafaelReia/errors/issues/events{/number}","events_url":"https://api.github.com/repos/RafaelReia/errors/events","assignees_url":"https://api.github.com/repos/RafaelReia/errors/assignees{/user}","branches_url":"https://api.github.com/repos/RafaelReia/errors/branches{/branch}","tags_url":"https://api.github.com/repos/RafaelReia/errors/tags","blobs_url":"https://api.github.com/repos/RafaelReia/errors/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RafaelReia/errors/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RafaelReia/errors/git/refs{/sha}","trees_url":"https://api.github.com/repos/RafaelReia/errors/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RafaelReia/errors/statuses/{sha}","languages_url":"https://api.github.com/repos/RafaelReia/errors/languages","stargazers_url":"https://api.github.com/repos/RafaelReia/errors/stargazers","contributors_url":"https://api.github.com/repos/RafaelReia/errors/contributors","subscribers_url":"https://api.github.com/repos/RafaelReia/errors/subscribers","subscription_url":"https://api.github.com/repos/RafaelReia/errors/subscription","commits_url":"https://api.github.com/repos/RafaelReia/errors/commits{/sha}","git_commits_url":"https://api.github.com/repos/RafaelReia/errors/git/commits{/sha}","comments_url":"https://api.github.com/repos/RafaelReia/errors/comments{/number}","issue_comment_url":"https://api.github.com/repos/RafaelReia/errors/issues/comments{/number}","contents_url":"https://api.github.com/repos/RafaelReia/errors/contents/{+path}","compare_url":"https://api.github.com/repos/RafaelReia/errors/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RafaelReia/errors/merges","archive_url":"https://api.github.com/repos/RafaelReia/errors/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RafaelReia/errors/downloads","issues_url":"https://api.github.com/repos/RafaelReia/errors/issues{/number}","pulls_url":"https://api.github.com/repos/RafaelReia/errors/pulls{/number}","milestones_url":"https://api.github.com/repos/RafaelReia/errors/milestones{/number}","notifications_url":"https://api.github.com/repos/RafaelReia/errors/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RafaelReia/errors/labels{/name}","releases_url":"https://api.github.com/repos/RafaelReia/errors/releases{/id}","deployments_url":"https://api.github.com/repos/RafaelReia/errors/deployments","created_at":"2017-05-11T14:40:12Z","updated_at":"2017-05-11T14:40:13Z","pushed_at":"2017-05-15T15:57:08Z","git_url":"git://github.com/RafaelReia/errors.git","ssh_url":"git@github.com:RafaelReia/errors.git","clone_url":"https://github.com/RafaelReia/errors.git","svn_url":"https://github.com/RafaelReia/errors","homepage":"","size":16,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"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":"alexkappa:master","ref":"master","sha":"cfcf53fa50d5a8b62d44d6c5fb455d6f8a202dc0","user":{"login":"alexkappa","id":1204095,"avatar_url":"https://avatars3.githubusercontent.com/u/1204095?v=3","gravatar_id":"","url":"https://api.github.com/users/alexkappa","html_url":"https://github.com/alexkappa","followers_url":"https://api.github.com/users/alexkappa/followers","following_url":"https://api.github.com/users/alexkappa/following{/other_user}","gists_url":"https://api.github.com/users/alexkappa/gists{/gist_id}","starred_url":"https://api.github.com/users/alexkappa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexkappa/subscriptions","organizations_url":"https://api.github.com/users/alexkappa/orgs","repos_url":"https://api.github.com/users/alexkappa/repos","events_url":"https://api.github.com/users/alexkappa/events{/privacy}","received_events_url":"https://api.github.com/users/alexkappa/received_events","type":"User","site_admin":false},"repo":{"id":31120646,"name":"errors","full_name":"alexkappa/errors","owner":{"login":"alexkappa","id":1204095,"avatar_url":"https://avatars3.githubusercontent.com/u/1204095?v=3","gravatar_id":"","url":"https://api.github.com/users/alexkappa","html_url":"https://github.com/alexkappa","followers_url":"https://api.github.com/users/alexkappa/followers","following_url":"https://api.github.com/users/alexkappa/following{/other_user}","gists_url":"https://api.github.com/users/alexkappa/gists{/gist_id}","starred_url":"https://api.github.com/users/alexkappa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexkappa/subscriptions","organizations_url":"https://api.github.com/users/alexkappa/orgs","repos_url":"https://api.github.com/users/alexkappa/repos","events_url":"https://api.github.com/users/alexkappa/events{/privacy}","received_events_url":"https://api.github.com/users/alexkappa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexkappa/errors","description":"Similar to standard library errors but with some stack trace goodness","fork":false,"url":"https://api.github.com/repos/alexkappa/errors","forks_url":"https://api.github.com/repos/alexkappa/errors/forks","keys_url":"https://api.github.com/repos/alexkappa/errors/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexkappa/errors/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexkappa/errors/teams","hooks_url":"https://api.github.com/repos/alexkappa/errors/hooks","issue_events_url":"https://api.github.com/repos/alexkappa/errors/issues/events{/number}","events_url":"https://api.github.com/repos/alexkappa/errors/events","assignees_url":"https://api.github.com/repos/alexkappa/errors/assignees{/user}","branches_url":"https://api.github.com/repos/alexkappa/errors/branches{/branch}","tags_url":"https://api.github.com/repos/alexkappa/errors/tags","blobs_url":"https://api.github.com/repos/alexkappa/errors/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexkappa/errors/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexkappa/errors/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexkappa/errors/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexkappa/errors/statuses/{sha}","languages_url":"https://api.github.com/repos/alexkappa/errors/languages","stargazers_url":"https://api.github.com/repos/alexkappa/errors/stargazers","contributors_url":"https://api.github.com/repos/alexkappa/errors/contributors","subscribers_url":"https://api.github.com/repos/alexkappa/errors/subscribers","subscription_url":"https://api.github.com/repos/alexkappa/errors/subscription","commits_url":"https://api.github.com/repos/alexkappa/errors/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexkappa/errors/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexkappa/errors/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexkappa/errors/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexkappa/errors/contents/{+path}","compare_url":"https://api.github.com/repos/alexkappa/errors/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexkappa/errors/merges","archive_url":"https://api.github.com/repos/alexkappa/errors/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexkappa/errors/downloads","issues_url":"https://api.github.com/repos/alexkappa/errors/issues{/number}","pulls_url":"https://api.github.com/repos/alexkappa/errors/pulls{/number}","milestones_url":"https://api.github.com/repos/alexkappa/errors/milestones{/number}","notifications_url":"https://api.github.com/repos/alexkappa/errors/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexkappa/errors/labels{/name}","releases_url":"https://api.github.com/repos/alexkappa/errors/releases{/id}","deployments_url":"https://api.github.com/repos/alexkappa/errors/deployments","created_at":"2015-02-21T09:20:20Z","updated_at":"2017-03-24T10:52:10Z","pushed_at":"2017-05-15T15:57:09Z","git_url":"git://github.com/alexkappa/errors.git","ssh_url":"git@github.com:alexkappa/errors.git","clone_url":"https://github.com/alexkappa/errors.git","svn_url":"https://github.com/alexkappa/errors","homepage":"","size":8,"stargazers_count":6,"watchers_count":6,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alexkappa/errors/pulls/1"},"html":{"href":"https://github.com/alexkappa/errors/pull/1"},"issue":{"href":"https://api.github.com/repos/alexkappa/errors/issues/1"},"comments":{"href":"https://api.github.com/repos/alexkappa/errors/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/alexkappa/errors/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/alexkappa/errors/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alexkappa/errors/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/alexkappa/errors/statuses/705ae4b00255e616ec3b2b9f5ba8c0670feb27c3"}}}}
{"actor":{"display_login":"alexkappa"}}