{"action":"created","comment":{"url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/comments/50318850","id":50318850,"diff_hunk":"@@ -38,12 +39,18 @@ func checkMandatory(headers map[string]string, name string) (string, error) {\n \treturn value, nil\n }\n \n-func checkAssertType(assertType AssertionType) (*assertionTypeRegistration, error) {\n-\treg := typeRegistry[assertType]\n-\tif reg == nil {\n-\t\treturn nil, fmt.Errorf(\"unknown assertion type: %v\", assertType)\n+var errInvalidAssertionType = errors.New(\"invalid assertion type\")","path":"asserts/checkers.go","position":16,"original_position":16,"commit_id":"df76412dedcfc7e2b722be5ccf4bbdb84997f167","original_commit_id":"df76412dedcfc7e2b722be5ccf4bbdb84997f167","user":{"login":"pedronis","id":975757,"avatar_url":"https://avatars.githubusercontent.com/u/975757?v=3","gravatar_id":"","url":"https://api.github.com/users/pedronis","html_url":"https://github.com/pedronis","followers_url":"https://api.github.com/users/pedronis/followers","following_url":"https://api.github.com/users/pedronis/following{/other_user}","gists_url":"https://api.github.com/users/pedronis/gists{/gist_id}","starred_url":"https://api.github.com/users/pedronis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedronis/subscriptions","organizations_url":"https://api.github.com/users/pedronis/orgs","repos_url":"https://api.github.com/users/pedronis/repos","events_url":"https://api.github.com/users/pedronis/events{/privacy}","received_events_url":"https://api.github.com/users/pedronis/received_events","type":"User","site_admin":false},"body":"it's tested by the Sign() test, but maybe you meant something else","created_at":"2016-01-20T21:06:33Z","updated_at":"2016-01-20T21:06:33Z","html_url":"https://github.com/ubuntu-core/snappy/pull/350#discussion_r50318850","pull_request_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/350","_links":{"self":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/comments/50318850"},"html":{"href":"https://github.com/ubuntu-core/snappy/pull/350#discussion_r50318850"},"pull_request":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/350"}}},"pull_request":{"url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/350","id":56663051,"html_url":"https://github.com/ubuntu-core/snappy/pull/350","diff_url":"https://github.com/ubuntu-core/snappy/pull/350.diff","patch_url":"https://github.com/ubuntu-core/snappy/pull/350.patch","issue_url":"https://api.github.com/repos/ubuntu-core/snappy/issues/350","number":350,"state":"open","locked":false,"title":"asserts: make AssertionType into a real struct exposing the metadata Name and PrimaryKey","user":{"login":"pedronis","id":975757,"avatar_url":"https://avatars.githubusercontent.com/u/975757?v=3","gravatar_id":"","url":"https://api.github.com/users/pedronis","html_url":"https://github.com/pedronis","followers_url":"https://api.github.com/users/pedronis/followers","following_url":"https://api.github.com/users/pedronis/following{/other_user}","gists_url":"https://api.github.com/users/pedronis/gists{/gist_id}","starred_url":"https://api.github.com/users/pedronis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedronis/subscriptions","organizations_url":"https://api.github.com/users/pedronis/orgs","repos_url":"https://api.github.com/users/pedronis/repos","events_url":"https://api.github.com/users/pedronis/events{/privacy}","received_events_url":"https://api.github.com/users/pedronis/received_events","type":"User","site_admin":false},"body":"this doesn't yet simplify the Backstore interface but it should be possible to leave out the primaryKeyHeaders there and possibly even have just Put(Assertion) in a 2nd branch\r\n\r\nwould have been smaller if it wasn't for the few s/asserts.AssertionType(\"test-only\")/asserts.TestOnlyType/ in tests","created_at":"2016-01-20T20:33:00Z","updated_at":"2016-01-20T21:06:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee19c2f347eabca32696e356641a52c885ba7b27","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/350/commits","review_comments_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/350/comments","review_comment_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ubuntu-core/snappy/issues/350/comments","statuses_url":"https://api.github.com/repos/ubuntu-core/snappy/statuses/df76412dedcfc7e2b722be5ccf4bbdb84997f167","head":{"label":"pedronis:asserts-assert-type-struct","ref":"asserts-assert-type-struct","sha":"df76412dedcfc7e2b722be5ccf4bbdb84997f167","user":{"login":"pedronis","id":975757,"avatar_url":"https://avatars.githubusercontent.com/u/975757?v=3","gravatar_id":"","url":"https://api.github.com/users/pedronis","html_url":"https://github.com/pedronis","followers_url":"https://api.github.com/users/pedronis/followers","following_url":"https://api.github.com/users/pedronis/following{/other_user}","gists_url":"https://api.github.com/users/pedronis/gists{/gist_id}","starred_url":"https://api.github.com/users/pedronis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedronis/subscriptions","organizations_url":"https://api.github.com/users/pedronis/orgs","repos_url":"https://api.github.com/users/pedronis/repos","events_url":"https://api.github.com/users/pedronis/events{/privacy}","received_events_url":"https://api.github.com/users/pedronis/received_events","type":"User","site_admin":false},"repo":{"id":45828707,"name":"snappy","full_name":"pedronis/snappy","owner":{"login":"pedronis","id":975757,"avatar_url":"https://avatars.githubusercontent.com/u/975757?v=3","gravatar_id":"","url":"https://api.github.com/users/pedronis","html_url":"https://github.com/pedronis","followers_url":"https://api.github.com/users/pedronis/followers","following_url":"https://api.github.com/users/pedronis/following{/other_user}","gists_url":"https://api.github.com/users/pedronis/gists{/gist_id}","starred_url":"https://api.github.com/users/pedronis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedronis/subscriptions","organizations_url":"https://api.github.com/users/pedronis/orgs","repos_url":"https://api.github.com/users/pedronis/repos","events_url":"https://api.github.com/users/pedronis/events{/privacy}","received_events_url":"https://api.github.com/users/pedronis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pedronis/snappy","description":"Snappy is the software at the heart of Ubuntu Core.","fork":true,"url":"https://api.github.com/repos/pedronis/snappy","forks_url":"https://api.github.com/repos/pedronis/snappy/forks","keys_url":"https://api.github.com/repos/pedronis/snappy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pedronis/snappy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pedronis/snappy/teams","hooks_url":"https://api.github.com/repos/pedronis/snappy/hooks","issue_events_url":"https://api.github.com/repos/pedronis/snappy/issues/events{/number}","events_url":"https://api.github.com/repos/pedronis/snappy/events","assignees_url":"https://api.github.com/repos/pedronis/snappy/assignees{/user}","branches_url":"https://api.github.com/repos/pedronis/snappy/branches{/branch}","tags_url":"https://api.github.com/repos/pedronis/snappy/tags","blobs_url":"https://api.github.com/repos/pedronis/snappy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pedronis/snappy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pedronis/snappy/git/refs{/sha}","trees_url":"https://api.github.com/repos/pedronis/snappy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pedronis/snappy/statuses/{sha}","languages_url":"https://api.github.com/repos/pedronis/snappy/languages","stargazers_url":"https://api.github.com/repos/pedronis/snappy/stargazers","contributors_url":"https://api.github.com/repos/pedronis/snappy/contributors","subscribers_url":"https://api.github.com/repos/pedronis/snappy/subscribers","subscription_url":"https://api.github.com/repos/pedronis/snappy/subscription","commits_url":"https://api.github.com/repos/pedronis/snappy/commits{/sha}","git_commits_url":"https://api.github.com/repos/pedronis/snappy/git/commits{/sha}","comments_url":"https://api.github.com/repos/pedronis/snappy/comments{/number}","issue_comment_url":"https://api.github.com/repos/pedronis/snappy/issues/comments{/number}","contents_url":"https://api.github.com/repos/pedronis/snappy/contents/{+path}","compare_url":"https://api.github.com/repos/pedronis/snappy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pedronis/snappy/merges","archive_url":"https://api.github.com/repos/pedronis/snappy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pedronis/snappy/downloads","issues_url":"https://api.github.com/repos/pedronis/snappy/issues{/number}","pulls_url":"https://api.github.com/repos/pedronis/snappy/pulls{/number}","milestones_url":"https://api.github.com/repos/pedronis/snappy/milestones{/number}","notifications_url":"https://api.github.com/repos/pedronis/snappy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pedronis/snappy/labels{/name}","releases_url":"https://api.github.com/repos/pedronis/snappy/releases{/id}","created_at":"2015-11-09T09:40:46Z","updated_at":"2016-01-13T09:10:26Z","pushed_at":"2016-01-20T20:34:40Z","git_url":"git://github.com/pedronis/snappy.git","ssh_url":"git@github.com:pedronis/snappy.git","clone_url":"https://github.com/pedronis/snappy.git","svn_url":"https://github.com/pedronis/snappy","homepage":null,"size":24298,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"ubuntu-core:master","ref":"master","sha":"1b30c9037a7066f3cdf406091a1c381b73893a13","user":{"login":"ubuntu-core","id":15022473,"avatar_url":"https://avatars.githubusercontent.com/u/15022473?v=3","gravatar_id":"","url":"https://api.github.com/users/ubuntu-core","html_url":"https://github.com/ubuntu-core","followers_url":"https://api.github.com/users/ubuntu-core/followers","following_url":"https://api.github.com/users/ubuntu-core/following{/other_user}","gists_url":"https://api.github.com/users/ubuntu-core/gists{/gist_id}","starred_url":"https://api.github.com/users/ubuntu-core/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubuntu-core/subscriptions","organizations_url":"https://api.github.com/users/ubuntu-core/orgs","repos_url":"https://api.github.com/users/ubuntu-core/repos","events_url":"https://api.github.com/users/ubuntu-core/events{/privacy}","received_events_url":"https://api.github.com/users/ubuntu-core/received_events","type":"Organization","site_admin":false},"repo":{"id":44672744,"name":"snappy","full_name":"ubuntu-core/snappy","owner":{"login":"ubuntu-core","id":15022473,"avatar_url":"https://avatars.githubusercontent.com/u/15022473?v=3","gravatar_id":"","url":"https://api.github.com/users/ubuntu-core","html_url":"https://github.com/ubuntu-core","followers_url":"https://api.github.com/users/ubuntu-core/followers","following_url":"https://api.github.com/users/ubuntu-core/following{/other_user}","gists_url":"https://api.github.com/users/ubuntu-core/gists{/gist_id}","starred_url":"https://api.github.com/users/ubuntu-core/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubuntu-core/subscriptions","organizations_url":"https://api.github.com/users/ubuntu-core/orgs","repos_url":"https://api.github.com/users/ubuntu-core/repos","events_url":"https://api.github.com/users/ubuntu-core/events{/privacy}","received_events_url":"https://api.github.com/users/ubuntu-core/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ubuntu-core/snappy","description":"Snappy is the software at the heart of Ubuntu Core.","fork":false,"url":"https://api.github.com/repos/ubuntu-core/snappy","forks_url":"https://api.github.com/repos/ubuntu-core/snappy/forks","keys_url":"https://api.github.com/repos/ubuntu-core/snappy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubuntu-core/snappy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubuntu-core/snappy/teams","hooks_url":"https://api.github.com/repos/ubuntu-core/snappy/hooks","issue_events_url":"https://api.github.com/repos/ubuntu-core/snappy/issues/events{/number}","events_url":"https://api.github.com/repos/ubuntu-core/snappy/events","assignees_url":"https://api.github.com/repos/ubuntu-core/snappy/assignees{/user}","branches_url":"https://api.github.com/repos/ubuntu-core/snappy/branches{/branch}","tags_url":"https://api.github.com/repos/ubuntu-core/snappy/tags","blobs_url":"https://api.github.com/repos/ubuntu-core/snappy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubuntu-core/snappy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubuntu-core/snappy/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubuntu-core/snappy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubuntu-core/snappy/statuses/{sha}","languages_url":"https://api.github.com/repos/ubuntu-core/snappy/languages","stargazers_url":"https://api.github.com/repos/ubuntu-core/snappy/stargazers","contributors_url":"https://api.github.com/repos/ubuntu-core/snappy/contributors","subscribers_url":"https://api.github.com/repos/ubuntu-core/snappy/subscribers","subscription_url":"https://api.github.com/repos/ubuntu-core/snappy/subscription","commits_url":"https://api.github.com/repos/ubuntu-core/snappy/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubuntu-core/snappy/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubuntu-core/snappy/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubuntu-core/snappy/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubuntu-core/snappy/contents/{+path}","compare_url":"https://api.github.com/repos/ubuntu-core/snappy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubuntu-core/snappy/merges","archive_url":"https://api.github.com/repos/ubuntu-core/snappy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubuntu-core/snappy/downloads","issues_url":"https://api.github.com/repos/ubuntu-core/snappy/issues{/number}","pulls_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls{/number}","milestones_url":"https://api.github.com/repos/ubuntu-core/snappy/milestones{/number}","notifications_url":"https://api.github.com/repos/ubuntu-core/snappy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubuntu-core/snappy/labels{/name}","releases_url":"https://api.github.com/repos/ubuntu-core/snappy/releases{/id}","created_at":"2015-10-21T11:51:46Z","updated_at":"2016-01-19T08:01:39Z","pushed_at":"2016-01-20T20:34:40Z","git_url":"git://github.com/ubuntu-core/snappy.git","ssh_url":"git@github.com:ubuntu-core/snappy.git","clone_url":"https://github.com/ubuntu-core/snappy.git","svn_url":"https://github.com/ubuntu-core/snappy","homepage":null,"size":25012,"stargazers_count":49,"watchers_count":49,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":15,"forks":21,"open_issues":15,"watchers":49,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/350"},"html":{"href":"https://github.com/ubuntu-core/snappy/pull/350"},"issue":{"href":"https://api.github.com/repos/ubuntu-core/snappy/issues/350"},"comments":{"href":"https://api.github.com/repos/ubuntu-core/snappy/issues/350/comments"},"review_comments":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/350/comments"},"review_comment":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/350/commits"},"statuses":{"href":"https://api.github.com/repos/ubuntu-core/snappy/statuses/df76412dedcfc7e2b722be5ccf4bbdb84997f167"}}}}