{"action":"created","comment":{"url":"https://api.github.com/repos/giantswarm/microerror/pulls/comments/129799252","pull_request_review_id":52608228,"id":129799252,"diff_hunk":"@@ -2,38 +2,42 @@\n // and efficient error handling.\n package microerror\n \n-import (\n-\t\"fmt\"\n-\n-\t\"github.com/juju/errgo\"\n-)\n-\n var (\n-\t// MaskAny is a simple error masker. Masked errors act as tracers within the\n-\t// source code. Inspecting an masked error shows where the error was passed\n-\t// through within the code base. This is gold for debugging and bug huntin.\n-\tMaskAny = errgo.MaskFunc(errgo.Any)\n+\tDefault = NewErrgoHandler(ErrgoHandlerConfig{\n+\t\tCallDepth: 1,","path":"error.go","position":null,"original_position":16,"commit_id":"10ab4bea94c4bbdff658d6d96a8c95c2ae0753db","original_commit_id":"66477acb1bd789a695c7f5ca41f328341ce604c7","user":{"login":"kopiczko","id":4608994,"avatar_url":"https://avatars0.githubusercontent.com/u/4608994?v=4","gravatar_id":"","url":"https://api.github.com/users/kopiczko","html_url":"https://github.com/kopiczko","followers_url":"https://api.github.com/users/kopiczko/followers","following_url":"https://api.github.com/users/kopiczko/following{/other_user}","gists_url":"https://api.github.com/users/kopiczko/gists{/gist_id}","starred_url":"https://api.github.com/users/kopiczko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kopiczko/subscriptions","organizations_url":"https://api.github.com/users/kopiczko/orgs","repos_url":"https://api.github.com/users/kopiczko/repos","events_url":"https://api.github.com/users/kopiczko/events{/privacy}","received_events_url":"https://api.github.com/users/kopiczko/received_events","type":"User","site_admin":false},"body":">  You change the default of the whole package, for everybody using this package.\r\n\r\nIf you're passing an instance of the variable instead, you can still mutate its state and the result is similar. This gives false feeling of safety IMO.\r\n\r\n> Imagine somebody does this with a dependency you are relying on and everything ends up in your project's vendor directory.\r\n\r\nI doubt any sane implementor of a library would do that.\r\n\r\n---\r\n\r\nI don't want to argue. I see your point, but I just want make operatorkit to be customisable by external users, while keeping our defaults.\r\n\r\n---\r\n \r\nI added this hackery: https://github.com/giantswarm/microerror/pull/3/commits/10ab4bea94c4bbdff658d6d96a8c95c2ae0753db\r\n\r\nThis makes `Default` usable, outside the `Mask` functions. LMK if you like it.\r\nIf you do: I'll add tests for `Default`.\r\nIf you don't: I revert that and make `Default` private, because I want to keep it going.\r\n\r\n\r\n\r\n\r\n\r\n","created_at":"2017-07-27T09:52:39Z","updated_at":"2017-07-27T09:52:39Z","html_url":"https://github.com/giantswarm/microerror/pull/3#discussion_r129799252","pull_request_url":"https://api.github.com/repos/giantswarm/microerror/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/giantswarm/microerror/pulls/comments/129799252"},"html":{"href":"https://github.com/giantswarm/microerror/pull/3#discussion_r129799252"},"pull_request":{"href":"https://api.github.com/repos/giantswarm/microerror/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/giantswarm/microerror/pulls/3","id":132494249,"html_url":"https://github.com/giantswarm/microerror/pull/3","diff_url":"https://github.com/giantswarm/microerror/pull/3.diff","patch_url":"https://github.com/giantswarm/microerror/pull/3.patch","issue_url":"https://api.github.com/repos/giantswarm/microerror/issues/3","number":3,"state":"open","locked":false,"title":"allow changing handler impl","user":{"login":"kopiczko","id":4608994,"avatar_url":"https://avatars0.githubusercontent.com/u/4608994?v=4","gravatar_id":"","url":"https://api.github.com/users/kopiczko","html_url":"https://github.com/kopiczko","followers_url":"https://api.github.com/users/kopiczko/followers","following_url":"https://api.github.com/users/kopiczko/following{/other_user}","gists_url":"https://api.github.com/users/kopiczko/gists{/gist_id}","starred_url":"https://api.github.com/users/kopiczko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kopiczko/subscriptions","organizations_url":"https://api.github.com/users/kopiczko/orgs","repos_url":"https://api.github.com/users/kopiczko/repos","events_url":"https://api.github.com/users/kopiczko/events{/privacy}","received_events_url":"https://api.github.com/users/kopiczko/received_events","type":"User","site_admin":false},"body":"* create Handler interface\r\n* create global Default implementation which can be configured by user\r\n* add Mask and Maskf functions (remove Any from names)\r\n* add Cause func to not force using projects to import external package\r\n* remove PanicOnError\r\n* add errors constructors (New, Newf)\r\n\r\n---\r\n\r\nThis takes `HttpClient` approach of having global `Default` var which can be customised to the user needs.\r\n\r\nWe want to have that wrapper to be able to switch masking implementation easily. If we care about that, we should also give freedom to our library users.\r\n\r\n---\r\n\r\nI'm fishing for 2 LGTMs here.\r\n\r\nTowards https://github.com/giantswarm/microkit/issues/73","created_at":"2017-07-26T11:41:55Z","updated_at":"2017-07-27T09:52:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b00d495fe1a0a4c33f90d6e3478e0132912b456","assignee":{"login":"kopiczko","id":4608994,"avatar_url":"https://avatars0.githubusercontent.com/u/4608994?v=4","gravatar_id":"","url":"https://api.github.com/users/kopiczko","html_url":"https://github.com/kopiczko","followers_url":"https://api.github.com/users/kopiczko/followers","following_url":"https://api.github.com/users/kopiczko/following{/other_user}","gists_url":"https://api.github.com/users/kopiczko/gists{/gist_id}","starred_url":"https://api.github.com/users/kopiczko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kopiczko/subscriptions","organizations_url":"https://api.github.com/users/kopiczko/orgs","repos_url":"https://api.github.com/users/kopiczko/repos","events_url":"https://api.github.com/users/kopiczko/events{/privacy}","received_events_url":"https://api.github.com/users/kopiczko/received_events","type":"User","site_admin":false},"assignees":[{"login":"kopiczko","id":4608994,"avatar_url":"https://avatars0.githubusercontent.com/u/4608994?v=4","gravatar_id":"","url":"https://api.github.com/users/kopiczko","html_url":"https://github.com/kopiczko","followers_url":"https://api.github.com/users/kopiczko/followers","following_url":"https://api.github.com/users/kopiczko/following{/other_user}","gists_url":"https://api.github.com/users/kopiczko/gists{/gist_id}","starred_url":"https://api.github.com/users/kopiczko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kopiczko/subscriptions","organizations_url":"https://api.github.com/users/kopiczko/orgs","repos_url":"https://api.github.com/users/kopiczko/repos","events_url":"https://api.github.com/users/kopiczko/events{/privacy}","received_events_url":"https://api.github.com/users/kopiczko/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"JosephSalisbury","id":297653,"avatar_url":"https://avatars1.githubusercontent.com/u/297653?v=4","gravatar_id":"","url":"https://api.github.com/users/JosephSalisbury","html_url":"https://github.com/JosephSalisbury","followers_url":"https://api.github.com/users/JosephSalisbury/followers","following_url":"https://api.github.com/users/JosephSalisbury/following{/other_user}","gists_url":"https://api.github.com/users/JosephSalisbury/gists{/gist_id}","starred_url":"https://api.github.com/users/JosephSalisbury/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosephSalisbury/subscriptions","organizations_url":"https://api.github.com/users/JosephSalisbury/orgs","repos_url":"https://api.github.com/users/JosephSalisbury/repos","events_url":"https://api.github.com/users/JosephSalisbury/events{/privacy}","received_events_url":"https://api.github.com/users/JosephSalisbury/received_events","type":"User","site_admin":false},{"login":"rossf7","id":311527,"avatar_url":"https://avatars1.githubusercontent.com/u/311527?v=4","gravatar_id":"","url":"https://api.github.com/users/rossf7","html_url":"https://github.com/rossf7","followers_url":"https://api.github.com/users/rossf7/followers","following_url":"https://api.github.com/users/rossf7/following{/other_user}","gists_url":"https://api.github.com/users/rossf7/gists{/gist_id}","starred_url":"https://api.github.com/users/rossf7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossf7/subscriptions","organizations_url":"https://api.github.com/users/rossf7/orgs","repos_url":"https://api.github.com/users/rossf7/repos","events_url":"https://api.github.com/users/rossf7/events{/privacy}","received_events_url":"https://api.github.com/users/rossf7/received_events","type":"User","site_admin":false},{"login":"MarcelMue","id":9303709,"avatar_url":"https://avatars1.githubusercontent.com/u/9303709?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcelMue","html_url":"https://github.com/MarcelMue","followers_url":"https://api.github.com/users/MarcelMue/followers","following_url":"https://api.github.com/users/MarcelMue/following{/other_user}","gists_url":"https://api.github.com/users/MarcelMue/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcelMue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcelMue/subscriptions","organizations_url":"https://api.github.com/users/MarcelMue/orgs","repos_url":"https://api.github.com/users/MarcelMue/repos","events_url":"https://api.github.com/users/MarcelMue/events{/privacy}","received_events_url":"https://api.github.com/users/MarcelMue/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/giantswarm/microerror/pulls/3/commits","review_comments_url":"https://api.github.com/repos/giantswarm/microerror/pulls/3/comments","review_comment_url":"https://api.github.com/repos/giantswarm/microerror/pulls/comments{/number}","comments_url":"https://api.github.com/repos/giantswarm/microerror/issues/3/comments","statuses_url":"https://api.github.com/repos/giantswarm/microerror/statuses/10ab4bea94c4bbdff658d6d96a8c95c2ae0753db","head":{"label":"giantswarm:cause","ref":"cause","sha":"10ab4bea94c4bbdff658d6d96a8c95c2ae0753db","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":95687502,"name":"microerror","full_name":"giantswarm/microerror","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/giantswarm/microerror","description":null,"fork":false,"url":"https://api.github.com/repos/giantswarm/microerror","forks_url":"https://api.github.com/repos/giantswarm/microerror/forks","keys_url":"https://api.github.com/repos/giantswarm/microerror/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/microerror/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/microerror/teams","hooks_url":"https://api.github.com/repos/giantswarm/microerror/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/microerror/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/microerror/events","assignees_url":"https://api.github.com/repos/giantswarm/microerror/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/microerror/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/microerror/tags","blobs_url":"https://api.github.com/repos/giantswarm/microerror/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/microerror/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/microerror/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/microerror/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/microerror/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/microerror/languages","stargazers_url":"https://api.github.com/repos/giantswarm/microerror/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/microerror/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/microerror/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/microerror/subscription","commits_url":"https://api.github.com/repos/giantswarm/microerror/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/microerror/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/microerror/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/microerror/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/microerror/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/microerror/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/microerror/merges","archive_url":"https://api.github.com/repos/giantswarm/microerror/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/microerror/downloads","issues_url":"https://api.github.com/repos/giantswarm/microerror/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/microerror/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/microerror/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/microerror/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/microerror/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/microerror/releases{/id}","deployments_url":"https://api.github.com/repos/giantswarm/microerror/deployments","created_at":"2017-06-28T16:01:48Z","updated_at":"2017-06-28T16:23:30Z","pushed_at":"2017-07-27T09:33:11Z","git_url":"git://github.com/giantswarm/microerror.git","ssh_url":"git@github.com:giantswarm/microerror.git","clone_url":"https://github.com/giantswarm/microerror.git","svn_url":"https://github.com/giantswarm/microerror","homepage":null,"size":27,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"giantswarm:master","ref":"master","sha":"853e8d9e0e4c8c642c1ca9a3260fdd4072dc8e09","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":95687502,"name":"microerror","full_name":"giantswarm/microerror","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/giantswarm/microerror","description":null,"fork":false,"url":"https://api.github.com/repos/giantswarm/microerror","forks_url":"https://api.github.com/repos/giantswarm/microerror/forks","keys_url":"https://api.github.com/repos/giantswarm/microerror/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/microerror/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/microerror/teams","hooks_url":"https://api.github.com/repos/giantswarm/microerror/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/microerror/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/microerror/events","assignees_url":"https://api.github.com/repos/giantswarm/microerror/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/microerror/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/microerror/tags","blobs_url":"https://api.github.com/repos/giantswarm/microerror/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/microerror/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/microerror/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/microerror/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/microerror/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/microerror/languages","stargazers_url":"https://api.github.com/repos/giantswarm/microerror/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/microerror/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/microerror/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/microerror/subscription","commits_url":"https://api.github.com/repos/giantswarm/microerror/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/microerror/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/microerror/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/microerror/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/microerror/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/microerror/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/microerror/merges","archive_url":"https://api.github.com/repos/giantswarm/microerror/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/microerror/downloads","issues_url":"https://api.github.com/repos/giantswarm/microerror/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/microerror/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/microerror/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/microerror/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/microerror/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/microerror/releases{/id}","deployments_url":"https://api.github.com/repos/giantswarm/microerror/deployments","created_at":"2017-06-28T16:01:48Z","updated_at":"2017-06-28T16:23:30Z","pushed_at":"2017-07-27T09:33:11Z","git_url":"git://github.com/giantswarm/microerror.git","ssh_url":"git@github.com:giantswarm/microerror.git","clone_url":"https://github.com/giantswarm/microerror.git","svn_url":"https://github.com/giantswarm/microerror","homepage":null,"size":27,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/giantswarm/microerror/pulls/3"},"html":{"href":"https://github.com/giantswarm/microerror/pull/3"},"issue":{"href":"https://api.github.com/repos/giantswarm/microerror/issues/3"},"comments":{"href":"https://api.github.com/repos/giantswarm/microerror/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/giantswarm/microerror/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/giantswarm/microerror/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/giantswarm/microerror/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/giantswarm/microerror/statuses/10ab4bea94c4bbdff658d6d96a8c95c2ae0753db"}}}}
{"actor":{"display_login":"kopiczko"}}