{"action":"created","comment":{"url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/pulls/comments/64353338","id":64353338,"diff_hunk":"@@ -18,11 +19,14 @@ import (\n \n var logger = loggo.GetLogger(\"bakery\")\n \n+var uuidGen = fastuuid.MustNewGenerator()","path":"bakery/service.go","position":12,"original_position":12,"commit_id":"89b582b0e50567749ebdb68fe8131096ed5dfb36","original_commit_id":"f6adf0281755bfd6b6a9407db7e17bf7d1341957","user":{"login":"mattyw","id":160718,"avatar_url":"https://avatars.githubusercontent.com/u/160718?v=3","gravatar_id":"","url":"https://api.github.com/users/mattyw","html_url":"https://github.com/mattyw","followers_url":"https://api.github.com/users/mattyw/followers","following_url":"https://api.github.com/users/mattyw/following{/other_user}","gists_url":"https://api.github.com/users/mattyw/gists{/gist_id}","starred_url":"https://api.github.com/users/mattyw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattyw/subscriptions","organizations_url":"https://api.github.com/users/mattyw/orgs","repos_url":"https://api.github.com/users/mattyw/repos","events_url":"https://api.github.com/users/mattyw/events{/privacy}","received_events_url":"https://api.github.com/users/mattyw/received_events","type":"User","site_admin":false},"body":"Even so, macaroon-bakery is just a library, it should be up to the app to decide, but at least it would happen on startup I guess. One concern I have is that depending on the un knowable logging strategy of said app this panic could be logged without any context of where it came from. Why not just do it in NewService?","created_at":"2016-05-24T09:03:48Z","updated_at":"2016-05-24T09:03:48Z","html_url":"https://github.com/go-macaroon-bakery/macaroon-bakery/pull/99#discussion_r64353338","pull_request_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/pulls/99","_links":{"self":{"href":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/pulls/comments/64353338"},"html":{"href":"https://github.com/go-macaroon-bakery/macaroon-bakery/pull/99#discussion_r64353338"},"pull_request":{"href":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/pulls/99"}}},"pull_request":{"url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/pulls/99","id":71100802,"html_url":"https://github.com/go-macaroon-bakery/macaroon-bakery/pull/99","diff_url":"https://github.com/go-macaroon-bakery/macaroon-bakery/pull/99.diff","patch_url":"https://github.com/go-macaroon-bakery/macaroon-bakery/pull/99.patch","issue_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/issues/99","number":99,"state":"open","locked":false,"title":"bakery: add RootKeyStorage","user":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=3","gravatar_id":"","url":"https://api.github.com/users/rogpeppe","html_url":"https://github.com/rogpeppe","followers_url":"https://api.github.com/users/rogpeppe/followers","following_url":"https://api.github.com/users/rogpeppe/following{/other_user}","gists_url":"https://api.github.com/users/rogpeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/rogpeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogpeppe/subscriptions","organizations_url":"https://api.github.com/users/rogpeppe/orgs","repos_url":"https://api.github.com/users/rogpeppe/repos","events_url":"https://api.github.com/users/rogpeppe/events{/privacy}","received_events_url":"https://api.github.com/users/rogpeppe/received_events","type":"User","site_admin":false},"body":"This makes it easy to re-use macaroon root keys as desired,\r\nand also to use domain-object-specific root keys to\r\nmint macaroons that are limited in scope.\r\n\r\nEven though we re-use public keys, we ensure that all macaroon\r\nids are unique by appending a nonce to the id.\r\n\r\nA subsequent PR will introduce a mongodb-backed implementation of RootKeyStorage.\r\n\r\n","created_at":"2016-05-23T18:45:44Z","updated_at":"2016-05-24T09:03:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f3bd3d7970333d1e932ffc3ca6a4c33385ea0c3a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/pulls/99/commits","review_comments_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/pulls/99/comments","review_comment_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/issues/99/comments","statuses_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/statuses/89b582b0e50567749ebdb68fe8131096ed5dfb36","head":{"label":"rogpeppe:063-rootkeystorage","ref":"063-rootkeystorage","sha":"89b582b0e50567749ebdb68fe8131096ed5dfb36","user":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=3","gravatar_id":"","url":"https://api.github.com/users/rogpeppe","html_url":"https://github.com/rogpeppe","followers_url":"https://api.github.com/users/rogpeppe/followers","following_url":"https://api.github.com/users/rogpeppe/following{/other_user}","gists_url":"https://api.github.com/users/rogpeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/rogpeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogpeppe/subscriptions","organizations_url":"https://api.github.com/users/rogpeppe/orgs","repos_url":"https://api.github.com/users/rogpeppe/repos","events_url":"https://api.github.com/users/rogpeppe/events{/privacy}","received_events_url":"https://api.github.com/users/rogpeppe/received_events","type":"User","site_admin":false},"repo":{"id":26593657,"name":"macaroon-bakery","full_name":"rogpeppe/macaroon-bakery","owner":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=3","gravatar_id":"","url":"https://api.github.com/users/rogpeppe","html_url":"https://github.com/rogpeppe","followers_url":"https://api.github.com/users/rogpeppe/followers","following_url":"https://api.github.com/users/rogpeppe/following{/other_user}","gists_url":"https://api.github.com/users/rogpeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/rogpeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogpeppe/subscriptions","organizations_url":"https://api.github.com/users/rogpeppe/orgs","repos_url":"https://api.github.com/users/rogpeppe/repos","events_url":"https://api.github.com/users/rogpeppe/events{/privacy}","received_events_url":"https://api.github.com/users/rogpeppe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rogpeppe/macaroon-bakery","description":"We bake 'em sweet, we bake 'em nice","fork":true,"url":"https://api.github.com/repos/rogpeppe/macaroon-bakery","forks_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/forks","keys_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/teams","hooks_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/hooks","issue_events_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/issues/events{/number}","events_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/events","assignees_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/assignees{/user}","branches_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/branches{/branch}","tags_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/tags","blobs_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/git/refs{/sha}","trees_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/statuses/{sha}","languages_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/languages","stargazers_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/stargazers","contributors_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/contributors","subscribers_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/subscribers","subscription_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/subscription","commits_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/commits{/sha}","git_commits_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/git/commits{/sha}","comments_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/comments{/number}","issue_comment_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/issues/comments{/number}","contents_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/contents/{+path}","compare_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/merges","archive_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/downloads","issues_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/issues{/number}","pulls_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/pulls{/number}","milestones_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/milestones{/number}","notifications_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/labels{/name}","releases_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/releases{/id}","deployments_url":"https://api.github.com/repos/rogpeppe/macaroon-bakery/deployments","created_at":"2014-11-13T15:18:37Z","updated_at":"2014-12-11T03:12:38Z","pushed_at":"2016-05-24T09:00:28Z","git_url":"git://github.com/rogpeppe/macaroon-bakery.git","ssh_url":"git@github.com:rogpeppe/macaroon-bakery.git","clone_url":"https://github.com/rogpeppe/macaroon-bakery.git","svn_url":"https://github.com/rogpeppe/macaroon-bakery","homepage":null,"size":431,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"v0"}},"base":{"label":"go-macaroon-bakery:v1","ref":"v1","sha":"c8e0209b0f4e48e8603ab0ae2477445f9443fbdc","user":{"login":"go-macaroon-bakery","id":9721471,"avatar_url":"https://avatars.githubusercontent.com/u/9721471?v=3","gravatar_id":"","url":"https://api.github.com/users/go-macaroon-bakery","html_url":"https://github.com/go-macaroon-bakery","followers_url":"https://api.github.com/users/go-macaroon-bakery/followers","following_url":"https://api.github.com/users/go-macaroon-bakery/following{/other_user}","gists_url":"https://api.github.com/users/go-macaroon-bakery/gists{/gist_id}","starred_url":"https://api.github.com/users/go-macaroon-bakery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/go-macaroon-bakery/subscriptions","organizations_url":"https://api.github.com/users/go-macaroon-bakery/orgs","repos_url":"https://api.github.com/users/go-macaroon-bakery/repos","events_url":"https://api.github.com/users/go-macaroon-bakery/events{/privacy}","received_events_url":"https://api.github.com/users/go-macaroon-bakery/received_events","type":"Organization","site_admin":false},"repo":{"id":26593206,"name":"macaroon-bakery","full_name":"go-macaroon-bakery/macaroon-bakery","owner":{"login":"go-macaroon-bakery","id":9721471,"avatar_url":"https://avatars.githubusercontent.com/u/9721471?v=3","gravatar_id":"","url":"https://api.github.com/users/go-macaroon-bakery","html_url":"https://github.com/go-macaroon-bakery","followers_url":"https://api.github.com/users/go-macaroon-bakery/followers","following_url":"https://api.github.com/users/go-macaroon-bakery/following{/other_user}","gists_url":"https://api.github.com/users/go-macaroon-bakery/gists{/gist_id}","starred_url":"https://api.github.com/users/go-macaroon-bakery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/go-macaroon-bakery/subscriptions","organizations_url":"https://api.github.com/users/go-macaroon-bakery/orgs","repos_url":"https://api.github.com/users/go-macaroon-bakery/repos","events_url":"https://api.github.com/users/go-macaroon-bakery/events{/privacy}","received_events_url":"https://api.github.com/users/go-macaroon-bakery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/go-macaroon-bakery/macaroon-bakery","description":"We bake 'em sweet, we bake 'em nice","fork":false,"url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery","forks_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/forks","keys_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/teams","hooks_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/hooks","issue_events_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/issues/events{/number}","events_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/events","assignees_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/assignees{/user}","branches_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/branches{/branch}","tags_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/tags","blobs_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/git/refs{/sha}","trees_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/statuses/{sha}","languages_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/languages","stargazers_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/stargazers","contributors_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/contributors","subscribers_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/subscribers","subscription_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/subscription","commits_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/commits{/sha}","git_commits_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/git/commits{/sha}","comments_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/comments{/number}","issue_comment_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/issues/comments{/number}","contents_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/contents/{+path}","compare_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/merges","archive_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/downloads","issues_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/issues{/number}","pulls_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/pulls{/number}","milestones_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/milestones{/number}","notifications_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/labels{/name}","releases_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/releases{/id}","deployments_url":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/deployments","created_at":"2014-11-13T15:08:41Z","updated_at":"2016-04-29T03:50:32Z","pushed_at":"2016-05-24T09:00:28Z","git_url":"git://github.com/go-macaroon-bakery/macaroon-bakery.git","ssh_url":"git@github.com:go-macaroon-bakery/macaroon-bakery.git","clone_url":"https://github.com/go-macaroon-bakery/macaroon-bakery.git","svn_url":"https://github.com/go-macaroon-bakery/macaroon-bakery","homepage":null,"size":465,"stargazers_count":18,"watchers_count":18,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":6,"forks":11,"open_issues":6,"watchers":18,"default_branch":"v1"}},"_links":{"self":{"href":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/pulls/99"},"html":{"href":"https://github.com/go-macaroon-bakery/macaroon-bakery/pull/99"},"issue":{"href":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/issues/99"},"comments":{"href":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/issues/99/comments"},"review_comments":{"href":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/pulls/99/comments"},"review_comment":{"href":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/pulls/99/commits"},"statuses":{"href":"https://api.github.com/repos/go-macaroon-bakery/macaroon-bakery/statuses/89b582b0e50567749ebdb68fe8131096ed5dfb36"}}}}
{"actor":{"display_login":"mattyw"}}