{"action":"created","comment":{"url":"https://api.github.com/repos/blendlabs/go-exception/pulls/comments/56097451","id":56097451,"diff_hunk":"@@ -83,23 +92,33 @@ func Wrap(err error) error {\n \t}\n }\n \n+// WrapMany wraps an arbitrary number of exceptions.\n func WrapMany(err ...error) error {\n \tvar ex *Exception\n+\tdidSet := false\n \tfor _, e := range err {\n-\t\tif typeWrapped, didTypeCorrectly := Wrap(e).(*Exception); didTypeCorrectly {\n-\t\t\tif typeWrapped != nil {\n-\t\t\t\tif ex == nil {\n-\t\t\t\t\tex = typeWrapped\n-\t\t\t\t} else {\n-\t\t\t\t\ttypeWrapped.innerException = ex\n-\t\t\t\t\tex = typeWrapped\n+\t\tif e != nil {\n+\t\t\tif typeWrapped, didTypeCorrectly := Wrap(e).(*Exception); didTypeCorrectly {\n+\t\t\t\tif typeWrapped != nil {\n+\t\t\t\t\tif ex == nil {\n+\t\t\t\t\t\tex = typeWrapped\n+\t\t\t\t\t} else {\n+\t\t\t\t\t\ttypeWrapped.innerException = ex\n+\t\t\t\t\t\tex = typeWrapped\n+\t\t\t\t\t}\n \t\t\t\t}\n+\t\t\t\tdidSet = true\n \t\t\t}\n \t\t}\n \t}\n-\treturn ex\n+\tif didSet {","path":"exception.go","position":103,"original_position":103,"commit_id":"be4b07a438606525738b77bf1e021d1aa5b2a781","original_commit_id":"be4b07a438606525738b77bf1e021d1aa5b2a781","user":{"login":"wcharczuk","id":697472,"avatar_url":"https://avatars.githubusercontent.com/u/697472?v=3","gravatar_id":"","url":"https://api.github.com/users/wcharczuk","html_url":"https://github.com/wcharczuk","followers_url":"https://api.github.com/users/wcharczuk/followers","following_url":"https://api.github.com/users/wcharczuk/following{/other_user}","gists_url":"https://api.github.com/users/wcharczuk/gists{/gist_id}","starred_url":"https://api.github.com/users/wcharczuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcharczuk/subscriptions","organizations_url":"https://api.github.com/users/wcharczuk/orgs","repos_url":"https://api.github.com/users/wcharczuk/repos","events_url":"https://api.github.com/users/wcharczuk/events{/privacy}","received_events_url":"https://api.github.com/users/wcharczuk/received_events","type":"User","site_admin":false},"body":"this is because typed pointers to nil != nil","created_at":"2016-03-15T00:06:37Z","updated_at":"2016-03-15T00:06:37Z","html_url":"https://github.com/blendlabs/go-exception/pull/1#discussion_r56097451","pull_request_url":"https://api.github.com/repos/blendlabs/go-exception/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/blendlabs/go-exception/pulls/comments/56097451"},"html":{"href":"https://github.com/blendlabs/go-exception/pull/1#discussion_r56097451"},"pull_request":{"href":"https://api.github.com/repos/blendlabs/go-exception/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/blendlabs/go-exception/pulls/1","id":62836833,"html_url":"https://github.com/blendlabs/go-exception/pull/1","diff_url":"https://github.com/blendlabs/go-exception/pull/1.diff","patch_url":"https://github.com/blendlabs/go-exception/pull/1.patch","issue_url":"https://api.github.com/repos/blendlabs/go-exception/issues/1","number":1,"state":"open","locked":false,"title":"Passes golint, fixes bug in `WrapMany`","user":{"login":"wcharczuk","id":697472,"avatar_url":"https://avatars.githubusercontent.com/u/697472?v=3","gravatar_id":"","url":"https://api.github.com/users/wcharczuk","html_url":"https://github.com/wcharczuk","followers_url":"https://api.github.com/users/wcharczuk/followers","following_url":"https://api.github.com/users/wcharczuk/following{/other_user}","gists_url":"https://api.github.com/users/wcharczuk/gists{/gist_id}","starred_url":"https://api.github.com/users/wcharczuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcharczuk/subscriptions","organizations_url":"https://api.github.com/users/wcharczuk/orgs","repos_url":"https://api.github.com/users/wcharczuk/repos","events_url":"https://api.github.com/users/wcharczuk/events{/privacy}","received_events_url":"https://api.github.com/users/wcharczuk/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-15T00:04:21Z","updated_at":"2016-03-15T00:06:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd40c7f4c3236618c9a6b29bfa1541d1f1f6cd7c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/blendlabs/go-exception/pulls/1/commits","review_comments_url":"https://api.github.com/repos/blendlabs/go-exception/pulls/1/comments","review_comment_url":"https://api.github.com/repos/blendlabs/go-exception/pulls/comments{/number}","comments_url":"https://api.github.com/repos/blendlabs/go-exception/issues/1/comments","statuses_url":"https://api.github.com/repos/blendlabs/go-exception/statuses/be4b07a438606525738b77bf1e021d1aa5b2a781","head":{"label":"blendlabs:wcharczuk/golint","ref":"wcharczuk/golint","sha":"be4b07a438606525738b77bf1e021d1aa5b2a781","user":{"login":"blendlabs","id":1750546,"avatar_url":"https://avatars.githubusercontent.com/u/1750546?v=3","gravatar_id":"","url":"https://api.github.com/users/blendlabs","html_url":"https://github.com/blendlabs","followers_url":"https://api.github.com/users/blendlabs/followers","following_url":"https://api.github.com/users/blendlabs/following{/other_user}","gists_url":"https://api.github.com/users/blendlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/blendlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blendlabs/subscriptions","organizations_url":"https://api.github.com/users/blendlabs/orgs","repos_url":"https://api.github.com/users/blendlabs/repos","events_url":"https://api.github.com/users/blendlabs/events{/privacy}","received_events_url":"https://api.github.com/users/blendlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":47354967,"name":"go-exception","full_name":"blendlabs/go-exception","owner":{"login":"blendlabs","id":1750546,"avatar_url":"https://avatars.githubusercontent.com/u/1750546?v=3","gravatar_id":"","url":"https://api.github.com/users/blendlabs","html_url":"https://github.com/blendlabs","followers_url":"https://api.github.com/users/blendlabs/followers","following_url":"https://api.github.com/users/blendlabs/following{/other_user}","gists_url":"https://api.github.com/users/blendlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/blendlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blendlabs/subscriptions","organizations_url":"https://api.github.com/users/blendlabs/orgs","repos_url":"https://api.github.com/users/blendlabs/repos","events_url":"https://api.github.com/users/blendlabs/events{/privacy}","received_events_url":"https://api.github.com/users/blendlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/blendlabs/go-exception","description":"A simple exception library that wraps errors with a somewhat usable stack trace","fork":false,"url":"https://api.github.com/repos/blendlabs/go-exception","forks_url":"https://api.github.com/repos/blendlabs/go-exception/forks","keys_url":"https://api.github.com/repos/blendlabs/go-exception/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blendlabs/go-exception/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blendlabs/go-exception/teams","hooks_url":"https://api.github.com/repos/blendlabs/go-exception/hooks","issue_events_url":"https://api.github.com/repos/blendlabs/go-exception/issues/events{/number}","events_url":"https://api.github.com/repos/blendlabs/go-exception/events","assignees_url":"https://api.github.com/repos/blendlabs/go-exception/assignees{/user}","branches_url":"https://api.github.com/repos/blendlabs/go-exception/branches{/branch}","tags_url":"https://api.github.com/repos/blendlabs/go-exception/tags","blobs_url":"https://api.github.com/repos/blendlabs/go-exception/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blendlabs/go-exception/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blendlabs/go-exception/git/refs{/sha}","trees_url":"https://api.github.com/repos/blendlabs/go-exception/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blendlabs/go-exception/statuses/{sha}","languages_url":"https://api.github.com/repos/blendlabs/go-exception/languages","stargazers_url":"https://api.github.com/repos/blendlabs/go-exception/stargazers","contributors_url":"https://api.github.com/repos/blendlabs/go-exception/contributors","subscribers_url":"https://api.github.com/repos/blendlabs/go-exception/subscribers","subscription_url":"https://api.github.com/repos/blendlabs/go-exception/subscription","commits_url":"https://api.github.com/repos/blendlabs/go-exception/commits{/sha}","git_commits_url":"https://api.github.com/repos/blendlabs/go-exception/git/commits{/sha}","comments_url":"https://api.github.com/repos/blendlabs/go-exception/comments{/number}","issue_comment_url":"https://api.github.com/repos/blendlabs/go-exception/issues/comments{/number}","contents_url":"https://api.github.com/repos/blendlabs/go-exception/contents/{+path}","compare_url":"https://api.github.com/repos/blendlabs/go-exception/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blendlabs/go-exception/merges","archive_url":"https://api.github.com/repos/blendlabs/go-exception/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blendlabs/go-exception/downloads","issues_url":"https://api.github.com/repos/blendlabs/go-exception/issues{/number}","pulls_url":"https://api.github.com/repos/blendlabs/go-exception/pulls{/number}","milestones_url":"https://api.github.com/repos/blendlabs/go-exception/milestones{/number}","notifications_url":"https://api.github.com/repos/blendlabs/go-exception/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blendlabs/go-exception/labels{/name}","releases_url":"https://api.github.com/repos/blendlabs/go-exception/releases{/id}","deployments_url":"https://api.github.com/repos/blendlabs/go-exception/deployments","created_at":"2015-12-03T19:26:44Z","updated_at":"2016-03-09T22:10:28Z","pushed_at":"2016-03-15T00:04:21Z","git_url":"git://github.com/blendlabs/go-exception.git","ssh_url":"git@github.com:blendlabs/go-exception.git","clone_url":"https://github.com/blendlabs/go-exception.git","svn_url":"https://github.com/blendlabs/go-exception","homepage":null,"size":12,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":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":1,"default_branch":"master"}},"base":{"label":"blendlabs:master","ref":"master","sha":"4c5fb3b838fd613ec4fc4a78d60b972ff7a88ada","user":{"login":"blendlabs","id":1750546,"avatar_url":"https://avatars.githubusercontent.com/u/1750546?v=3","gravatar_id":"","url":"https://api.github.com/users/blendlabs","html_url":"https://github.com/blendlabs","followers_url":"https://api.github.com/users/blendlabs/followers","following_url":"https://api.github.com/users/blendlabs/following{/other_user}","gists_url":"https://api.github.com/users/blendlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/blendlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blendlabs/subscriptions","organizations_url":"https://api.github.com/users/blendlabs/orgs","repos_url":"https://api.github.com/users/blendlabs/repos","events_url":"https://api.github.com/users/blendlabs/events{/privacy}","received_events_url":"https://api.github.com/users/blendlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":47354967,"name":"go-exception","full_name":"blendlabs/go-exception","owner":{"login":"blendlabs","id":1750546,"avatar_url":"https://avatars.githubusercontent.com/u/1750546?v=3","gravatar_id":"","url":"https://api.github.com/users/blendlabs","html_url":"https://github.com/blendlabs","followers_url":"https://api.github.com/users/blendlabs/followers","following_url":"https://api.github.com/users/blendlabs/following{/other_user}","gists_url":"https://api.github.com/users/blendlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/blendlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blendlabs/subscriptions","organizations_url":"https://api.github.com/users/blendlabs/orgs","repos_url":"https://api.github.com/users/blendlabs/repos","events_url":"https://api.github.com/users/blendlabs/events{/privacy}","received_events_url":"https://api.github.com/users/blendlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/blendlabs/go-exception","description":"A simple exception library that wraps errors with a somewhat usable stack trace","fork":false,"url":"https://api.github.com/repos/blendlabs/go-exception","forks_url":"https://api.github.com/repos/blendlabs/go-exception/forks","keys_url":"https://api.github.com/repos/blendlabs/go-exception/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blendlabs/go-exception/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blendlabs/go-exception/teams","hooks_url":"https://api.github.com/repos/blendlabs/go-exception/hooks","issue_events_url":"https://api.github.com/repos/blendlabs/go-exception/issues/events{/number}","events_url":"https://api.github.com/repos/blendlabs/go-exception/events","assignees_url":"https://api.github.com/repos/blendlabs/go-exception/assignees{/user}","branches_url":"https://api.github.com/repos/blendlabs/go-exception/branches{/branch}","tags_url":"https://api.github.com/repos/blendlabs/go-exception/tags","blobs_url":"https://api.github.com/repos/blendlabs/go-exception/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blendlabs/go-exception/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blendlabs/go-exception/git/refs{/sha}","trees_url":"https://api.github.com/repos/blendlabs/go-exception/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blendlabs/go-exception/statuses/{sha}","languages_url":"https://api.github.com/repos/blendlabs/go-exception/languages","stargazers_url":"https://api.github.com/repos/blendlabs/go-exception/stargazers","contributors_url":"https://api.github.com/repos/blendlabs/go-exception/contributors","subscribers_url":"https://api.github.com/repos/blendlabs/go-exception/subscribers","subscription_url":"https://api.github.com/repos/blendlabs/go-exception/subscription","commits_url":"https://api.github.com/repos/blendlabs/go-exception/commits{/sha}","git_commits_url":"https://api.github.com/repos/blendlabs/go-exception/git/commits{/sha}","comments_url":"https://api.github.com/repos/blendlabs/go-exception/comments{/number}","issue_comment_url":"https://api.github.com/repos/blendlabs/go-exception/issues/comments{/number}","contents_url":"https://api.github.com/repos/blendlabs/go-exception/contents/{+path}","compare_url":"https://api.github.com/repos/blendlabs/go-exception/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blendlabs/go-exception/merges","archive_url":"https://api.github.com/repos/blendlabs/go-exception/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blendlabs/go-exception/downloads","issues_url":"https://api.github.com/repos/blendlabs/go-exception/issues{/number}","pulls_url":"https://api.github.com/repos/blendlabs/go-exception/pulls{/number}","milestones_url":"https://api.github.com/repos/blendlabs/go-exception/milestones{/number}","notifications_url":"https://api.github.com/repos/blendlabs/go-exception/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blendlabs/go-exception/labels{/name}","releases_url":"https://api.github.com/repos/blendlabs/go-exception/releases{/id}","deployments_url":"https://api.github.com/repos/blendlabs/go-exception/deployments","created_at":"2015-12-03T19:26:44Z","updated_at":"2016-03-09T22:10:28Z","pushed_at":"2016-03-15T00:04:21Z","git_url":"git://github.com/blendlabs/go-exception.git","ssh_url":"git@github.com:blendlabs/go-exception.git","clone_url":"https://github.com/blendlabs/go-exception.git","svn_url":"https://github.com/blendlabs/go-exception","homepage":null,"size":12,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/blendlabs/go-exception/pulls/1"},"html":{"href":"https://github.com/blendlabs/go-exception/pull/1"},"issue":{"href":"https://api.github.com/repos/blendlabs/go-exception/issues/1"},"comments":{"href":"https://api.github.com/repos/blendlabs/go-exception/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/blendlabs/go-exception/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/blendlabs/go-exception/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/blendlabs/go-exception/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/blendlabs/go-exception/statuses/be4b07a438606525738b77bf1e021d1aa5b2a781"}}}}