{"action":"created","comment":{"url":"https://api.github.com/repos/atmiguel/cerealnotes/pulls/comments/179907205","pull_request_review_id":110245327,"id":179907205,"diff_hunk":"@@ -36,24 +36,21 @@ func InsertIntoUsersTable(\n \tpassword []byte,\n \tcreationTime time.Time,\n ) error {\n-\tvar row *sql.Row\n-\t{\n-\t\tsqlQuery := `\n-\t\t\tINSERT INTO users (display_name, email_address, password, creation_time)\n-\t\t\tVALUES ($1, $2, $3, $4)`\n+\tsqlQuery := `\n+\t\tINSERT INTO users (display_name, email_address, password, creation_time)\n+\t\tVALUES ($1, $2, $3, $4)`\n \n-\t\trow = db.QueryRow(sqlQuery, displayName, emailAddress, password, creationTime)\n+\trows, err := db.Query(sqlQuery, displayName, emailAddress, password, creationTime)\n+\tif err != nil {\n+\t\treturn convertPostgresError(err)\n \t}\n+\tdefer rows.Close()\n \n-\tif err := row.Scan(); err != nil {\n-\t\tif err == sql.ErrNoRows { // success\n-\t\t\treturn nil\n-\t\t}\n-\n+\tif err = rows.Err(); err != nil {","path":"databaseutil/databaseutil.go","position":25,"original_position":25,"commit_id":"4d6e0aa483da120d3be44119c3b5c045b554fc74","original_commit_id":"4d6e0aa483da120d3be44119c3b5c045b554fc74","user":{"login":"atmiguel","id":549631,"avatar_url":"https://avatars0.githubusercontent.com/u/549631?v=4","gravatar_id":"","url":"https://api.github.com/users/atmiguel","html_url":"https://github.com/atmiguel","followers_url":"https://api.github.com/users/atmiguel/followers","following_url":"https://api.github.com/users/atmiguel/following{/other_user}","gists_url":"https://api.github.com/users/atmiguel/gists{/gist_id}","starred_url":"https://api.github.com/users/atmiguel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atmiguel/subscriptions","organizations_url":"https://api.github.com/users/atmiguel/orgs","repos_url":"https://api.github.com/users/atmiguel/repos","events_url":"https://api.github.com/users/atmiguel/events{/privacy}","received_events_url":"https://api.github.com/users/atmiguel/received_events","type":"User","site_admin":false},"body":"random nitpicky thing, but we should do `:=` here. Honestly wish `err` wasn't in scope here, so this couldn't happen, but that doesn't seem worth the hassle.","created_at":"2018-04-07T03:32:57Z","updated_at":"2018-04-07T03:39:27Z","html_url":"https://github.com/atmiguel/cerealnotes/pull/18#discussion_r179907205","pull_request_url":"https://api.github.com/repos/atmiguel/cerealnotes/pulls/18","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/atmiguel/cerealnotes/pulls/comments/179907205"},"html":{"href":"https://github.com/atmiguel/cerealnotes/pull/18#discussion_r179907205"},"pull_request":{"href":"https://api.github.com/repos/atmiguel/cerealnotes/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/atmiguel/cerealnotes/pulls/18","id":178719075,"html_url":"https://github.com/atmiguel/cerealnotes/pull/18","diff_url":"https://github.com/atmiguel/cerealnotes/pull/18.diff","patch_url":"https://github.com/atmiguel/cerealnotes/pull/18.patch","issue_url":"https://api.github.com/repos/atmiguel/cerealnotes/issues/18","number":18,"state":"open","locked":false,"title":"Addressed Evans comments","user":{"login":"zingales","id":796540,"avatar_url":"https://avatars3.githubusercontent.com/u/796540?v=4","gravatar_id":"","url":"https://api.github.com/users/zingales","html_url":"https://github.com/zingales","followers_url":"https://api.github.com/users/zingales/followers","following_url":"https://api.github.com/users/zingales/following{/other_user}","gists_url":"https://api.github.com/users/zingales/gists{/gist_id}","starred_url":"https://api.github.com/users/zingales/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zingales/subscriptions","organizations_url":"https://api.github.com/users/zingales/orgs","repos_url":"https://api.github.com/users/zingales/repos","events_url":"https://api.github.com/users/zingales/events{/privacy}","received_events_url":"https://api.github.com/users/zingales/received_events","type":"User","site_admin":false},"body":"Except return -1, nil. ","created_at":"2018-04-01T08:19:26Z","updated_at":"2018-04-07T03:39:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e85ee4b29dc38cade67547745eafe3be892345a8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/atmiguel/cerealnotes/pulls/18/commits","review_comments_url":"https://api.github.com/repos/atmiguel/cerealnotes/pulls/18/comments","review_comment_url":"https://api.github.com/repos/atmiguel/cerealnotes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atmiguel/cerealnotes/issues/18/comments","statuses_url":"https://api.github.com/repos/atmiguel/cerealnotes/statuses/4d6e0aa483da120d3be44119c3b5c045b554fc74","head":{"label":"atmiguel:evansComments","ref":"evansComments","sha":"4d6e0aa483da120d3be44119c3b5c045b554fc74","user":{"login":"atmiguel","id":549631,"avatar_url":"https://avatars0.githubusercontent.com/u/549631?v=4","gravatar_id":"","url":"https://api.github.com/users/atmiguel","html_url":"https://github.com/atmiguel","followers_url":"https://api.github.com/users/atmiguel/followers","following_url":"https://api.github.com/users/atmiguel/following{/other_user}","gists_url":"https://api.github.com/users/atmiguel/gists{/gist_id}","starred_url":"https://api.github.com/users/atmiguel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atmiguel/subscriptions","organizations_url":"https://api.github.com/users/atmiguel/orgs","repos_url":"https://api.github.com/users/atmiguel/repos","events_url":"https://api.github.com/users/atmiguel/events{/privacy}","received_events_url":"https://api.github.com/users/atmiguel/received_events","type":"User","site_admin":false},"repo":{"id":124090269,"name":"cerealnotes","full_name":"atmiguel/cerealnotes","owner":{"login":"atmiguel","id":549631,"avatar_url":"https://avatars0.githubusercontent.com/u/549631?v=4","gravatar_id":"","url":"https://api.github.com/users/atmiguel","html_url":"https://github.com/atmiguel","followers_url":"https://api.github.com/users/atmiguel/followers","following_url":"https://api.github.com/users/atmiguel/following{/other_user}","gists_url":"https://api.github.com/users/atmiguel/gists{/gist_id}","starred_url":"https://api.github.com/users/atmiguel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atmiguel/subscriptions","organizations_url":"https://api.github.com/users/atmiguel/orgs","repos_url":"https://api.github.com/users/atmiguel/repos","events_url":"https://api.github.com/users/atmiguel/events{/privacy}","received_events_url":"https://api.github.com/users/atmiguel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atmiguel/cerealnotes","description":null,"fork":false,"url":"https://api.github.com/repos/atmiguel/cerealnotes","forks_url":"https://api.github.com/repos/atmiguel/cerealnotes/forks","keys_url":"https://api.github.com/repos/atmiguel/cerealnotes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atmiguel/cerealnotes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atmiguel/cerealnotes/teams","hooks_url":"https://api.github.com/repos/atmiguel/cerealnotes/hooks","issue_events_url":"https://api.github.com/repos/atmiguel/cerealnotes/issues/events{/number}","events_url":"https://api.github.com/repos/atmiguel/cerealnotes/events","assignees_url":"https://api.github.com/repos/atmiguel/cerealnotes/assignees{/user}","branches_url":"https://api.github.com/repos/atmiguel/cerealnotes/branches{/branch}","tags_url":"https://api.github.com/repos/atmiguel/cerealnotes/tags","blobs_url":"https://api.github.com/repos/atmiguel/cerealnotes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atmiguel/cerealnotes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atmiguel/cerealnotes/git/refs{/sha}","trees_url":"https://api.github.com/repos/atmiguel/cerealnotes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atmiguel/cerealnotes/statuses/{sha}","languages_url":"https://api.github.com/repos/atmiguel/cerealnotes/languages","stargazers_url":"https://api.github.com/repos/atmiguel/cerealnotes/stargazers","contributors_url":"https://api.github.com/repos/atmiguel/cerealnotes/contributors","subscribers_url":"https://api.github.com/repos/atmiguel/cerealnotes/subscribers","subscription_url":"https://api.github.com/repos/atmiguel/cerealnotes/subscription","commits_url":"https://api.github.com/repos/atmiguel/cerealnotes/commits{/sha}","git_commits_url":"https://api.github.com/repos/atmiguel/cerealnotes/git/commits{/sha}","comments_url":"https://api.github.com/repos/atmiguel/cerealnotes/comments{/number}","issue_comment_url":"https://api.github.com/repos/atmiguel/cerealnotes/issues/comments{/number}","contents_url":"https://api.github.com/repos/atmiguel/cerealnotes/contents/{+path}","compare_url":"https://api.github.com/repos/atmiguel/cerealnotes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atmiguel/cerealnotes/merges","archive_url":"https://api.github.com/repos/atmiguel/cerealnotes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atmiguel/cerealnotes/downloads","issues_url":"https://api.github.com/repos/atmiguel/cerealnotes/issues{/number}","pulls_url":"https://api.github.com/repos/atmiguel/cerealnotes/pulls{/number}","milestones_url":"https://api.github.com/repos/atmiguel/cerealnotes/milestones{/number}","notifications_url":"https://api.github.com/repos/atmiguel/cerealnotes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atmiguel/cerealnotes/labels{/name}","releases_url":"https://api.github.com/repos/atmiguel/cerealnotes/releases{/id}","deployments_url":"https://api.github.com/repos/atmiguel/cerealnotes/deployments","created_at":"2018-03-06T14:28:42Z","updated_at":"2018-04-02T03:33:25Z","pushed_at":"2018-04-07T02:21:49Z","git_url":"git://github.com/atmiguel/cerealnotes.git","ssh_url":"git@github.com:atmiguel/cerealnotes.git","clone_url":"https://github.com/atmiguel/cerealnotes.git","svn_url":"https://github.com/atmiguel/cerealnotes","homepage":null,"size":199,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":1,"open_issues":4,"watchers":3,"default_branch":"master"}},"base":{"label":"atmiguel:master","ref":"master","sha":"e685517d5eedc0e709cfaab1b94460544198c888","user":{"login":"atmiguel","id":549631,"avatar_url":"https://avatars0.githubusercontent.com/u/549631?v=4","gravatar_id":"","url":"https://api.github.com/users/atmiguel","html_url":"https://github.com/atmiguel","followers_url":"https://api.github.com/users/atmiguel/followers","following_url":"https://api.github.com/users/atmiguel/following{/other_user}","gists_url":"https://api.github.com/users/atmiguel/gists{/gist_id}","starred_url":"https://api.github.com/users/atmiguel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atmiguel/subscriptions","organizations_url":"https://api.github.com/users/atmiguel/orgs","repos_url":"https://api.github.com/users/atmiguel/repos","events_url":"https://api.github.com/users/atmiguel/events{/privacy}","received_events_url":"https://api.github.com/users/atmiguel/received_events","type":"User","site_admin":false},"repo":{"id":124090269,"name":"cerealnotes","full_name":"atmiguel/cerealnotes","owner":{"login":"atmiguel","id":549631,"avatar_url":"https://avatars0.githubusercontent.com/u/549631?v=4","gravatar_id":"","url":"https://api.github.com/users/atmiguel","html_url":"https://github.com/atmiguel","followers_url":"https://api.github.com/users/atmiguel/followers","following_url":"https://api.github.com/users/atmiguel/following{/other_user}","gists_url":"https://api.github.com/users/atmiguel/gists{/gist_id}","starred_url":"https://api.github.com/users/atmiguel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atmiguel/subscriptions","organizations_url":"https://api.github.com/users/atmiguel/orgs","repos_url":"https://api.github.com/users/atmiguel/repos","events_url":"https://api.github.com/users/atmiguel/events{/privacy}","received_events_url":"https://api.github.com/users/atmiguel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atmiguel/cerealnotes","description":null,"fork":false,"url":"https://api.github.com/repos/atmiguel/cerealnotes","forks_url":"https://api.github.com/repos/atmiguel/cerealnotes/forks","keys_url":"https://api.github.com/repos/atmiguel/cerealnotes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atmiguel/cerealnotes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atmiguel/cerealnotes/teams","hooks_url":"https://api.github.com/repos/atmiguel/cerealnotes/hooks","issue_events_url":"https://api.github.com/repos/atmiguel/cerealnotes/issues/events{/number}","events_url":"https://api.github.com/repos/atmiguel/cerealnotes/events","assignees_url":"https://api.github.com/repos/atmiguel/cerealnotes/assignees{/user}","branches_url":"https://api.github.com/repos/atmiguel/cerealnotes/branches{/branch}","tags_url":"https://api.github.com/repos/atmiguel/cerealnotes/tags","blobs_url":"https://api.github.com/repos/atmiguel/cerealnotes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atmiguel/cerealnotes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atmiguel/cerealnotes/git/refs{/sha}","trees_url":"https://api.github.com/repos/atmiguel/cerealnotes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atmiguel/cerealnotes/statuses/{sha}","languages_url":"https://api.github.com/repos/atmiguel/cerealnotes/languages","stargazers_url":"https://api.github.com/repos/atmiguel/cerealnotes/stargazers","contributors_url":"https://api.github.com/repos/atmiguel/cerealnotes/contributors","subscribers_url":"https://api.github.com/repos/atmiguel/cerealnotes/subscribers","subscription_url":"https://api.github.com/repos/atmiguel/cerealnotes/subscription","commits_url":"https://api.github.com/repos/atmiguel/cerealnotes/commits{/sha}","git_commits_url":"https://api.github.com/repos/atmiguel/cerealnotes/git/commits{/sha}","comments_url":"https://api.github.com/repos/atmiguel/cerealnotes/comments{/number}","issue_comment_url":"https://api.github.com/repos/atmiguel/cerealnotes/issues/comments{/number}","contents_url":"https://api.github.com/repos/atmiguel/cerealnotes/contents/{+path}","compare_url":"https://api.github.com/repos/atmiguel/cerealnotes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atmiguel/cerealnotes/merges","archive_url":"https://api.github.com/repos/atmiguel/cerealnotes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atmiguel/cerealnotes/downloads","issues_url":"https://api.github.com/repos/atmiguel/cerealnotes/issues{/number}","pulls_url":"https://api.github.com/repos/atmiguel/cerealnotes/pulls{/number}","milestones_url":"https://api.github.com/repos/atmiguel/cerealnotes/milestones{/number}","notifications_url":"https://api.github.com/repos/atmiguel/cerealnotes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atmiguel/cerealnotes/labels{/name}","releases_url":"https://api.github.com/repos/atmiguel/cerealnotes/releases{/id}","deployments_url":"https://api.github.com/repos/atmiguel/cerealnotes/deployments","created_at":"2018-03-06T14:28:42Z","updated_at":"2018-04-02T03:33:25Z","pushed_at":"2018-04-07T02:21:49Z","git_url":"git://github.com/atmiguel/cerealnotes.git","ssh_url":"git@github.com:atmiguel/cerealnotes.git","clone_url":"https://github.com/atmiguel/cerealnotes.git","svn_url":"https://github.com/atmiguel/cerealnotes","homepage":null,"size":199,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":1,"open_issues":4,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atmiguel/cerealnotes/pulls/18"},"html":{"href":"https://github.com/atmiguel/cerealnotes/pull/18"},"issue":{"href":"https://api.github.com/repos/atmiguel/cerealnotes/issues/18"},"comments":{"href":"https://api.github.com/repos/atmiguel/cerealnotes/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/atmiguel/cerealnotes/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/atmiguel/cerealnotes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atmiguel/cerealnotes/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/atmiguel/cerealnotes/statuses/4d6e0aa483da120d3be44119c3b5c045b554fc74"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"atmiguel"}}