{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/rkt/pulls/comments/85873112","pull_request_review_id":6561672,"id":85873112,"diff_hunk":"@@ -59,21 +59,20 @@ func CreateBackup(dir, backupsDir string, limit int) error {\n func pruneOldBackups(dir string, limit int) error {\n \tif list, err := ioutil.ReadDir(dir); err != nil {\n \t\treturn err\n-\t} else {\n-\t\tfor _, fi := range list {\n-\t\t\tif num, err := strconv.Atoi(fi.Name()); err != nil {\n-\t\t\t\t// directory name is not a number,\n-\t\t\t\t// leave it alone\n-\t\t\t\tcontinue\n-\t\t\t} else if num < limit {\n-\t\t\t\t// directory name is a number lower\n-\t\t\t\t// than a limit, leave it alone\n-\t\t\t\tcontinue\n-\t\t\t}\n-\t\t\tpath := filepath.Join(dir, fi.Name())\n-\t\t\tif err := os.RemoveAll(path); err != nil {\n-\t\t\t\treturn err\n-\t\t\t}\n+\t}\n+\tfor _, fi := range list {","path":"pkg/backup/backup.go","position":20,"original_position":20,"commit_id":"7ada2fa02ff0e5b78a370204634cef451c38dfbd","original_commit_id":"7ada2fa02ff0e5b78a370204634cef451c38dfbd","user":{"login":"euank","id":2147649,"avatar_url":"https://avatars.githubusercontent.com/u/2147649?v=3","gravatar_id":"","url":"https://api.github.com/users/euank","html_url":"https://github.com/euank","followers_url":"https://api.github.com/users/euank/followers","following_url":"https://api.github.com/users/euank/following{/other_user}","gists_url":"https://api.github.com/users/euank/gists{/gist_id}","starred_url":"https://api.github.com/users/euank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/euank/subscriptions","organizations_url":"https://api.github.com/users/euank/orgs","repos_url":"https://api.github.com/users/euank/repos","events_url":"https://api.github.com/users/euank/events{/privacy}","received_events_url":"https://api.github.com/users/euank/received_events","type":"User","site_admin":false},"body":"`list` is now out of scope here since `if/else` blocks share the same scope, and removing the `else` block drops you outta the if scope.","created_at":"2016-11-01T04:15:02Z","updated_at":"2016-11-01T04:15:02Z","html_url":"https://github.com/coreos/rkt/pull/3337#discussion_r85873112","pull_request_url":"https://api.github.com/repos/coreos/rkt/pulls/3337","_links":{"self":{"href":"https://api.github.com/repos/coreos/rkt/pulls/comments/85873112"},"html":{"href":"https://github.com/coreos/rkt/pull/3337#discussion_r85873112"},"pull_request":{"href":"https://api.github.com/repos/coreos/rkt/pulls/3337"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/rkt/pulls/3337","id":91726123,"html_url":"https://github.com/coreos/rkt/pull/3337","diff_url":"https://github.com/coreos/rkt/pull/3337.diff","patch_url":"https://github.com/coreos/rkt/pull/3337.patch","issue_url":"https://api.github.com/repos/coreos/rkt/issues/3337","number":3337,"state":"open","locked":false,"title":"Idiomatic","user":{"login":"sinwav","id":8092087,"avatar_url":"https://avatars.githubusercontent.com/u/8092087?v=3","gravatar_id":"","url":"https://api.github.com/users/sinwav","html_url":"https://github.com/sinwav","followers_url":"https://api.github.com/users/sinwav/followers","following_url":"https://api.github.com/users/sinwav/following{/other_user}","gists_url":"https://api.github.com/users/sinwav/gists{/gist_id}","starred_url":"https://api.github.com/users/sinwav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinwav/subscriptions","organizations_url":"https://api.github.com/users/sinwav/orgs","repos_url":"https://api.github.com/users/sinwav/repos","events_url":"https://api.github.com/users/sinwav/events{/privacy}","received_events_url":"https://api.github.com/users/sinwav/received_events","type":"User","site_admin":false},"body":"There were a few return statements nested inside else statements at the end of functions. I removed the else block and unindented the sections. All functionality should be exactly the same\r\n\r\nSigned-off-by: nick <nicholasjamesrusso@gmail.com>","created_at":"2016-11-01T03:35:06Z","updated_at":"2016-11-01T04:15:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a108e1b8be5332195faa4627c1ca999f721f78d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/coreos/rkt/pulls/3337/commits","review_comments_url":"https://api.github.com/repos/coreos/rkt/pulls/3337/comments","review_comment_url":"https://api.github.com/repos/coreos/rkt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/rkt/issues/3337/comments","statuses_url":"https://api.github.com/repos/coreos/rkt/statuses/7ada2fa02ff0e5b78a370204634cef451c38dfbd","head":{"label":"sinwav:idiomatic","ref":"idiomatic","sha":"7ada2fa02ff0e5b78a370204634cef451c38dfbd","user":{"login":"sinwav","id":8092087,"avatar_url":"https://avatars.githubusercontent.com/u/8092087?v=3","gravatar_id":"","url":"https://api.github.com/users/sinwav","html_url":"https://github.com/sinwav","followers_url":"https://api.github.com/users/sinwav/followers","following_url":"https://api.github.com/users/sinwav/following{/other_user}","gists_url":"https://api.github.com/users/sinwav/gists{/gist_id}","starred_url":"https://api.github.com/users/sinwav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinwav/subscriptions","organizations_url":"https://api.github.com/users/sinwav/orgs","repos_url":"https://api.github.com/users/sinwav/repos","events_url":"https://api.github.com/users/sinwav/events{/privacy}","received_events_url":"https://api.github.com/users/sinwav/received_events","type":"User","site_admin":false},"repo":{"id":72498661,"name":"rkt","full_name":"sinwav/rkt","owner":{"login":"sinwav","id":8092087,"avatar_url":"https://avatars.githubusercontent.com/u/8092087?v=3","gravatar_id":"","url":"https://api.github.com/users/sinwav","html_url":"https://github.com/sinwav","followers_url":"https://api.github.com/users/sinwav/followers","following_url":"https://api.github.com/users/sinwav/following{/other_user}","gists_url":"https://api.github.com/users/sinwav/gists{/gist_id}","starred_url":"https://api.github.com/users/sinwav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinwav/subscriptions","organizations_url":"https://api.github.com/users/sinwav/orgs","repos_url":"https://api.github.com/users/sinwav/repos","events_url":"https://api.github.com/users/sinwav/events{/privacy}","received_events_url":"https://api.github.com/users/sinwav/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sinwav/rkt","description":"rkt is a container engine for Linux designed to be composable, secure, and built on standards","fork":true,"url":"https://api.github.com/repos/sinwav/rkt","forks_url":"https://api.github.com/repos/sinwav/rkt/forks","keys_url":"https://api.github.com/repos/sinwav/rkt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sinwav/rkt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sinwav/rkt/teams","hooks_url":"https://api.github.com/repos/sinwav/rkt/hooks","issue_events_url":"https://api.github.com/repos/sinwav/rkt/issues/events{/number}","events_url":"https://api.github.com/repos/sinwav/rkt/events","assignees_url":"https://api.github.com/repos/sinwav/rkt/assignees{/user}","branches_url":"https://api.github.com/repos/sinwav/rkt/branches{/branch}","tags_url":"https://api.github.com/repos/sinwav/rkt/tags","blobs_url":"https://api.github.com/repos/sinwav/rkt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sinwav/rkt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sinwav/rkt/git/refs{/sha}","trees_url":"https://api.github.com/repos/sinwav/rkt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sinwav/rkt/statuses/{sha}","languages_url":"https://api.github.com/repos/sinwav/rkt/languages","stargazers_url":"https://api.github.com/repos/sinwav/rkt/stargazers","contributors_url":"https://api.github.com/repos/sinwav/rkt/contributors","subscribers_url":"https://api.github.com/repos/sinwav/rkt/subscribers","subscription_url":"https://api.github.com/repos/sinwav/rkt/subscription","commits_url":"https://api.github.com/repos/sinwav/rkt/commits{/sha}","git_commits_url":"https://api.github.com/repos/sinwav/rkt/git/commits{/sha}","comments_url":"https://api.github.com/repos/sinwav/rkt/comments{/number}","issue_comment_url":"https://api.github.com/repos/sinwav/rkt/issues/comments{/number}","contents_url":"https://api.github.com/repos/sinwav/rkt/contents/{+path}","compare_url":"https://api.github.com/repos/sinwav/rkt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sinwav/rkt/merges","archive_url":"https://api.github.com/repos/sinwav/rkt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sinwav/rkt/downloads","issues_url":"https://api.github.com/repos/sinwav/rkt/issues{/number}","pulls_url":"https://api.github.com/repos/sinwav/rkt/pulls{/number}","milestones_url":"https://api.github.com/repos/sinwav/rkt/milestones{/number}","notifications_url":"https://api.github.com/repos/sinwav/rkt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sinwav/rkt/labels{/name}","releases_url":"https://api.github.com/repos/sinwav/rkt/releases{/id}","deployments_url":"https://api.github.com/repos/sinwav/rkt/deployments","created_at":"2016-11-01T03:00:17Z","updated_at":"2016-11-01T03:00:19Z","pushed_at":"2016-11-01T03:20:31Z","git_url":"git://github.com/sinwav/rkt.git","ssh_url":"git@github.com:sinwav/rkt.git","clone_url":"https://github.com/sinwav/rkt.git","svn_url":"https://github.com/sinwav/rkt","homepage":"","size":34721,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"coreos:master","ref":"master","sha":"1beeb893610051725db332f3d994b921823a6d5c","user":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"repo":{"id":26509369,"name":"rkt","full_name":"coreos/rkt","owner":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coreos/rkt","description":"rkt is a container engine for Linux designed to be composable, secure, and built on standards","fork":false,"url":"https://api.github.com/repos/coreos/rkt","forks_url":"https://api.github.com/repos/coreos/rkt/forks","keys_url":"https://api.github.com/repos/coreos/rkt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/rkt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/rkt/teams","hooks_url":"https://api.github.com/repos/coreos/rkt/hooks","issue_events_url":"https://api.github.com/repos/coreos/rkt/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/rkt/events","assignees_url":"https://api.github.com/repos/coreos/rkt/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/rkt/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/rkt/tags","blobs_url":"https://api.github.com/repos/coreos/rkt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/rkt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/rkt/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/rkt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/rkt/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/rkt/languages","stargazers_url":"https://api.github.com/repos/coreos/rkt/stargazers","contributors_url":"https://api.github.com/repos/coreos/rkt/contributors","subscribers_url":"https://api.github.com/repos/coreos/rkt/subscribers","subscription_url":"https://api.github.com/repos/coreos/rkt/subscription","commits_url":"https://api.github.com/repos/coreos/rkt/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/rkt/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/rkt/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/rkt/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/rkt/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/rkt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/rkt/merges","archive_url":"https://api.github.com/repos/coreos/rkt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/rkt/downloads","issues_url":"https://api.github.com/repos/coreos/rkt/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/rkt/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/rkt/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/rkt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/rkt/labels{/name}","releases_url":"https://api.github.com/repos/coreos/rkt/releases{/id}","deployments_url":"https://api.github.com/repos/coreos/rkt/deployments","created_at":"2014-11-11T23:13:18Z","updated_at":"2016-11-01T03:30:46Z","pushed_at":"2016-11-01T03:35:07Z","git_url":"git://github.com/coreos/rkt.git","ssh_url":"git@github.com:coreos/rkt.git","clone_url":"https://github.com/coreos/rkt.git","svn_url":"https://github.com/coreos/rkt","homepage":"","size":34721,"stargazers_count":6358,"watchers_count":6358,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":620,"mirror_url":null,"open_issues_count":404,"forks":620,"open_issues":404,"watchers":6358,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/rkt/pulls/3337"},"html":{"href":"https://github.com/coreos/rkt/pull/3337"},"issue":{"href":"https://api.github.com/repos/coreos/rkt/issues/3337"},"comments":{"href":"https://api.github.com/repos/coreos/rkt/issues/3337/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/rkt/pulls/3337/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/rkt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/rkt/pulls/3337/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/rkt/statuses/7ada2fa02ff0e5b78a370204634cef451c38dfbd"}}}}
{"actor":{"display_login":"euank"}}