{"action":"created","comment":{"url":"https://api.github.com/repos/attic-labs/noms/pulls/comments/90749154","pull_request_review_id":11269989,"id":90749154,"diff_hunk":"@@ -32,23 +30,39 @@ func main() {\n }\n \n type Photo struct {\n-\tId    string\n-\tSizes map[struct{ Width, Height int }]string\n+\tId            string\n+\tSizes         map[struct{ Width, Height int }]string\n+\tDateTaken     Date         `noms:\",omitempty\"`\n+\tDatePublished Date         `noms:\",omitempty\"`\n+\tDateUpdated   Date         `noms:\",omitempty\"`\n+\tTags          []string     `noms:\",omitempty\"`\n+\tSources       []string     `noms:\",omitempty\"`\n+\tOriginal      types.Struct `noms:\",original\"`\n+\tFaces         []struct {\n+\t\tName       string\n+\t\tX, Y, W, H float32\n+\t} `noms:\",omitempty\"`\n }\n \n type PhotoGroup struct {\n-\tCover  Photo\n-\tPhotos types.Set\n+\tId       string\n+\tCover    Photo\n+\tPhotos   []Photo\n+\tOriginal types.Struct `noms:\",original\"`\n }\n \n type Date struct {\n \tNsSinceEpoch float64\n }\n \n+func (d Date) IsEmpty() bool {\n+\treturn d.NsSinceEpoch == float64(0)\n+}\n+\n func index() (win bool) {\n \tvar dbStr = flag.String(\"db\", \"\", \"input database spec\")\n-\tvar groupsStr = flag.String(\"groups\", \"\", \"path within db to look for PhotoGroup structs\")\n \tvar outDSStr = flag.String(\"out-ds\", \"\", \"output dataset to write to - if empty, defaults to input dataset\")\n+\tvar indexPhotos = flag.Bool(\"index-photos\", false, \"index Photo (rather than PhotoGroup)\")","path":"samples/go/photo-index/main.go","position":55,"original_position":55,"commit_id":"1a658bbac7bb595209f757938e2e3cb380199232","original_commit_id":"1a658bbac7bb595209f757938e2e3cb380199232","user":{"login":"kalman","id":657134,"avatar_url":"https://avatars.githubusercontent.com/u/657134?v=3","gravatar_id":"","url":"https://api.github.com/users/kalman","html_url":"https://github.com/kalman","followers_url":"https://api.github.com/users/kalman/followers","following_url":"https://api.github.com/users/kalman/following{/other_user}","gists_url":"https://api.github.com/users/kalman/gists{/gist_id}","starred_url":"https://api.github.com/users/kalman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalman/subscriptions","organizations_url":"https://api.github.com/users/kalman/orgs","repos_url":"https://api.github.com/users/kalman/repos","events_url":"https://api.github.com/users/kalman/events{/privacy}","received_events_url":"https://api.github.com/users/kalman/received_events","type":"User","site_admin":false},"body":"Maybe `covers` would be more descriptive.","created_at":"2016-12-03T02:52:55Z","updated_at":"2016-12-03T02:52:55Z","html_url":"https://github.com/attic-labs/noms/pull/2902#discussion_r90749154","pull_request_url":"https://api.github.com/repos/attic-labs/noms/pulls/2902","_links":{"self":{"href":"https://api.github.com/repos/attic-labs/noms/pulls/comments/90749154"},"html":{"href":"https://github.com/attic-labs/noms/pull/2902#discussion_r90749154"},"pull_request":{"href":"https://api.github.com/repos/attic-labs/noms/pulls/2902"}}},"pull_request":{"url":"https://api.github.com/repos/attic-labs/noms/pulls/2902","id":96380367,"html_url":"https://github.com/attic-labs/noms/pull/2902","diff_url":"https://github.com/attic-labs/noms/pull/2902.diff","patch_url":"https://github.com/attic-labs/noms/pull/2902.patch","issue_url":"https://api.github.com/repos/attic-labs/noms/issues/2902","number":2902,"state":"open","locked":false,"title":"photo-index: output PhotoGroup instead of Photo","user":{"login":"aboodman","id":80388,"avatar_url":"https://avatars.githubusercontent.com/u/80388?v=3","gravatar_id":"","url":"https://api.github.com/users/aboodman","html_url":"https://github.com/aboodman","followers_url":"https://api.github.com/users/aboodman/followers","following_url":"https://api.github.com/users/aboodman/following{/other_user}","gists_url":"https://api.github.com/users/aboodman/gists{/gist_id}","starred_url":"https://api.github.com/users/aboodman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aboodman/subscriptions","organizations_url":"https://api.github.com/users/aboodman/orgs","repos_url":"https://api.github.com/users/aboodman/repos","events_url":"https://api.github.com/users/aboodman/events{/privacy}","received_events_url":"https://api.github.com/users/aboodman/received_events","type":"User","site_admin":false},"body":"photo-index: output PhotoGroup instead of Photo.\r\n\r\nThis will allow UIs to display duplicate photos. Also, simplify design by creating groups even when the group has one item.\r\n\r\nThis change also maintains the old behavior via a flag so that the UI can keep working until it is updated.","created_at":"2016-12-03T01:28:22Z","updated_at":"2016-12-03T02:52:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e1e053665fab2a3942ec27548cb003280665077","assignee":{"login":"kalman","id":657134,"avatar_url":"https://avatars.githubusercontent.com/u/657134?v=3","gravatar_id":"","url":"https://api.github.com/users/kalman","html_url":"https://github.com/kalman","followers_url":"https://api.github.com/users/kalman/followers","following_url":"https://api.github.com/users/kalman/following{/other_user}","gists_url":"https://api.github.com/users/kalman/gists{/gist_id}","starred_url":"https://api.github.com/users/kalman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalman/subscriptions","organizations_url":"https://api.github.com/users/kalman/orgs","repos_url":"https://api.github.com/users/kalman/repos","events_url":"https://api.github.com/users/kalman/events{/privacy}","received_events_url":"https://api.github.com/users/kalman/received_events","type":"User","site_admin":false},"assignees":[{"login":"kalman","id":657134,"avatar_url":"https://avatars.githubusercontent.com/u/657134?v=3","gravatar_id":"","url":"https://api.github.com/users/kalman","html_url":"https://github.com/kalman","followers_url":"https://api.github.com/users/kalman/followers","following_url":"https://api.github.com/users/kalman/following{/other_user}","gists_url":"https://api.github.com/users/kalman/gists{/gist_id}","starred_url":"https://api.github.com/users/kalman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalman/subscriptions","organizations_url":"https://api.github.com/users/kalman/orgs","repos_url":"https://api.github.com/users/kalman/repos","events_url":"https://api.github.com/users/kalman/events{/privacy}","received_events_url":"https://api.github.com/users/kalman/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/attic-labs/noms/pulls/2902/commits","review_comments_url":"https://api.github.com/repos/attic-labs/noms/pulls/2902/comments","review_comment_url":"https://api.github.com/repos/attic-labs/noms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/attic-labs/noms/issues/2902/comments","statuses_url":"https://api.github.com/repos/attic-labs/noms/statuses/1a658bbac7bb595209f757938e2e3cb380199232","head":{"label":"aboodman:photo-groups","ref":"photo-groups","sha":"1a658bbac7bb595209f757938e2e3cb380199232","user":{"login":"aboodman","id":80388,"avatar_url":"https://avatars.githubusercontent.com/u/80388?v=3","gravatar_id":"","url":"https://api.github.com/users/aboodman","html_url":"https://github.com/aboodman","followers_url":"https://api.github.com/users/aboodman/followers","following_url":"https://api.github.com/users/aboodman/following{/other_user}","gists_url":"https://api.github.com/users/aboodman/gists{/gist_id}","starred_url":"https://api.github.com/users/aboodman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aboodman/subscriptions","organizations_url":"https://api.github.com/users/aboodman/orgs","repos_url":"https://api.github.com/users/aboodman/repos","events_url":"https://api.github.com/users/aboodman/events{/privacy}","received_events_url":"https://api.github.com/users/aboodman/received_events","type":"User","site_admin":false},"repo":{"id":65707197,"name":"noms-1","full_name":"aboodman/noms-1","owner":{"login":"aboodman","id":80388,"avatar_url":"https://avatars.githubusercontent.com/u/80388?v=3","gravatar_id":"","url":"https://api.github.com/users/aboodman","html_url":"https://github.com/aboodman","followers_url":"https://api.github.com/users/aboodman/followers","following_url":"https://api.github.com/users/aboodman/following{/other_user}","gists_url":"https://api.github.com/users/aboodman/gists{/gist_id}","starred_url":"https://api.github.com/users/aboodman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aboodman/subscriptions","organizations_url":"https://api.github.com/users/aboodman/orgs","repos_url":"https://api.github.com/users/aboodman/repos","events_url":"https://api.github.com/users/aboodman/events{/privacy}","received_events_url":"https://api.github.com/users/aboodman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aboodman/noms-1","description":"The versioned, forkable, syncable database","fork":true,"url":"https://api.github.com/repos/aboodman/noms-1","forks_url":"https://api.github.com/repos/aboodman/noms-1/forks","keys_url":"https://api.github.com/repos/aboodman/noms-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aboodman/noms-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aboodman/noms-1/teams","hooks_url":"https://api.github.com/repos/aboodman/noms-1/hooks","issue_events_url":"https://api.github.com/repos/aboodman/noms-1/issues/events{/number}","events_url":"https://api.github.com/repos/aboodman/noms-1/events","assignees_url":"https://api.github.com/repos/aboodman/noms-1/assignees{/user}","branches_url":"https://api.github.com/repos/aboodman/noms-1/branches{/branch}","tags_url":"https://api.github.com/repos/aboodman/noms-1/tags","blobs_url":"https://api.github.com/repos/aboodman/noms-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aboodman/noms-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aboodman/noms-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/aboodman/noms-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aboodman/noms-1/statuses/{sha}","languages_url":"https://api.github.com/repos/aboodman/noms-1/languages","stargazers_url":"https://api.github.com/repos/aboodman/noms-1/stargazers","contributors_url":"https://api.github.com/repos/aboodman/noms-1/contributors","subscribers_url":"https://api.github.com/repos/aboodman/noms-1/subscribers","subscription_url":"https://api.github.com/repos/aboodman/noms-1/subscription","commits_url":"https://api.github.com/repos/aboodman/noms-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/aboodman/noms-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/aboodman/noms-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/aboodman/noms-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/aboodman/noms-1/contents/{+path}","compare_url":"https://api.github.com/repos/aboodman/noms-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aboodman/noms-1/merges","archive_url":"https://api.github.com/repos/aboodman/noms-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aboodman/noms-1/downloads","issues_url":"https://api.github.com/repos/aboodman/noms-1/issues{/number}","pulls_url":"https://api.github.com/repos/aboodman/noms-1/pulls{/number}","milestones_url":"https://api.github.com/repos/aboodman/noms-1/milestones{/number}","notifications_url":"https://api.github.com/repos/aboodman/noms-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aboodman/noms-1/labels{/name}","releases_url":"https://api.github.com/repos/aboodman/noms-1/releases{/id}","deployments_url":"https://api.github.com/repos/aboodman/noms-1/deployments","created_at":"2016-08-15T05:39:15Z","updated_at":"2016-08-15T05:39:18Z","pushed_at":"2016-12-03T01:25:11Z","git_url":"git://github.com/aboodman/noms-1.git","ssh_url":"git@github.com:aboodman/noms-1.git","clone_url":"https://github.com/aboodman/noms-1.git","svn_url":"https://github.com/aboodman/noms-1","homepage":"","size":28532,"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":"attic-labs:master","ref":"master","sha":"87958507b07e157e3ce42937a6ba352eab3ff501","user":{"login":"attic-labs","id":12534679,"avatar_url":"https://avatars.githubusercontent.com/u/12534679?v=3","gravatar_id":"","url":"https://api.github.com/users/attic-labs","html_url":"https://github.com/attic-labs","followers_url":"https://api.github.com/users/attic-labs/followers","following_url":"https://api.github.com/users/attic-labs/following{/other_user}","gists_url":"https://api.github.com/users/attic-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/attic-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attic-labs/subscriptions","organizations_url":"https://api.github.com/users/attic-labs/orgs","repos_url":"https://api.github.com/users/attic-labs/repos","events_url":"https://api.github.com/users/attic-labs/events{/privacy}","received_events_url":"https://api.github.com/users/attic-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":36778364,"name":"noms","full_name":"attic-labs/noms","owner":{"login":"attic-labs","id":12534679,"avatar_url":"https://avatars.githubusercontent.com/u/12534679?v=3","gravatar_id":"","url":"https://api.github.com/users/attic-labs","html_url":"https://github.com/attic-labs","followers_url":"https://api.github.com/users/attic-labs/followers","following_url":"https://api.github.com/users/attic-labs/following{/other_user}","gists_url":"https://api.github.com/users/attic-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/attic-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attic-labs/subscriptions","organizations_url":"https://api.github.com/users/attic-labs/orgs","repos_url":"https://api.github.com/users/attic-labs/repos","events_url":"https://api.github.com/users/attic-labs/events{/privacy}","received_events_url":"https://api.github.com/users/attic-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/attic-labs/noms","description":"The versioned, forkable, syncable database","fork":false,"url":"https://api.github.com/repos/attic-labs/noms","forks_url":"https://api.github.com/repos/attic-labs/noms/forks","keys_url":"https://api.github.com/repos/attic-labs/noms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/attic-labs/noms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/attic-labs/noms/teams","hooks_url":"https://api.github.com/repos/attic-labs/noms/hooks","issue_events_url":"https://api.github.com/repos/attic-labs/noms/issues/events{/number}","events_url":"https://api.github.com/repos/attic-labs/noms/events","assignees_url":"https://api.github.com/repos/attic-labs/noms/assignees{/user}","branches_url":"https://api.github.com/repos/attic-labs/noms/branches{/branch}","tags_url":"https://api.github.com/repos/attic-labs/noms/tags","blobs_url":"https://api.github.com/repos/attic-labs/noms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/attic-labs/noms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/attic-labs/noms/git/refs{/sha}","trees_url":"https://api.github.com/repos/attic-labs/noms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/attic-labs/noms/statuses/{sha}","languages_url":"https://api.github.com/repos/attic-labs/noms/languages","stargazers_url":"https://api.github.com/repos/attic-labs/noms/stargazers","contributors_url":"https://api.github.com/repos/attic-labs/noms/contributors","subscribers_url":"https://api.github.com/repos/attic-labs/noms/subscribers","subscription_url":"https://api.github.com/repos/attic-labs/noms/subscription","commits_url":"https://api.github.com/repos/attic-labs/noms/commits{/sha}","git_commits_url":"https://api.github.com/repos/attic-labs/noms/git/commits{/sha}","comments_url":"https://api.github.com/repos/attic-labs/noms/comments{/number}","issue_comment_url":"https://api.github.com/repos/attic-labs/noms/issues/comments{/number}","contents_url":"https://api.github.com/repos/attic-labs/noms/contents/{+path}","compare_url":"https://api.github.com/repos/attic-labs/noms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/attic-labs/noms/merges","archive_url":"https://api.github.com/repos/attic-labs/noms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/attic-labs/noms/downloads","issues_url":"https://api.github.com/repos/attic-labs/noms/issues{/number}","pulls_url":"https://api.github.com/repos/attic-labs/noms/pulls{/number}","milestones_url":"https://api.github.com/repos/attic-labs/noms/milestones{/number}","notifications_url":"https://api.github.com/repos/attic-labs/noms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/attic-labs/noms/labels{/name}","releases_url":"https://api.github.com/repos/attic-labs/noms/releases{/id}","deployments_url":"https://api.github.com/repos/attic-labs/noms/deployments","created_at":"2015-06-03T03:44:49Z","updated_at":"2016-12-02T17:34:41Z","pushed_at":"2016-12-03T01:44:37Z","git_url":"git://github.com/attic-labs/noms.git","ssh_url":"git@github.com:attic-labs/noms.git","clone_url":"https://github.com/attic-labs/noms.git","svn_url":"https://github.com/attic-labs/noms","homepage":"","size":41154,"stargazers_count":5870,"watchers_count":5870,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":172,"mirror_url":null,"open_issues_count":263,"forks":172,"open_issues":263,"watchers":5870,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/attic-labs/noms/pulls/2902"},"html":{"href":"https://github.com/attic-labs/noms/pull/2902"},"issue":{"href":"https://api.github.com/repos/attic-labs/noms/issues/2902"},"comments":{"href":"https://api.github.com/repos/attic-labs/noms/issues/2902/comments"},"review_comments":{"href":"https://api.github.com/repos/attic-labs/noms/pulls/2902/comments"},"review_comment":{"href":"https://api.github.com/repos/attic-labs/noms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/attic-labs/noms/pulls/2902/commits"},"statuses":{"href":"https://api.github.com/repos/attic-labs/noms/statuses/1a658bbac7bb595209f757938e2e3cb380199232"}}}}
{"actor":{"display_login":"kalman"}}