{"action":"created","comment":{"url":"https://api.github.com/repos/restic/restic/pulls/comments/77435962","id":77435962,"diff_hunk":"@@ -70,27 +70,29 @@ func SetupRepo() *repository.Repository {\n \treturn repo\n }\n \n-func TeardownRepo(repo *repository.Repository) {\n+func TeardownRepo(repo restic.Repository) {\n \tif !TestCleanupTempDirs {\n \t\tl := repo.Backend().(*local.Local)\n \t\tfmt.Printf(\"leaving local backend at %s\\n\", l.Location())\n \t\treturn\n \t}\n \n-\terr := repo.Delete()\n-\tif err != nil {\n-\t\tpanic(err)\n+\tif r, ok := repo.(restic.Deleter); ok {\n+\t\terr := r.Delete()\n+\t\tif err != nil {\n+\t\t\tpanic(err)\n+\t\t}\n \t}\n }\n \n-func SnapshotDir(t testing.TB, repo *repository.Repository, path string, parent *backend.ID) *restic.Snapshot {\n-\tarch := restic.NewArchiver(repo)\n+func SnapshotDir(t testing.TB, repo restic.Repository, path string, parent *restic.ID) *restic.Snapshot {","path":"src/restic/test/backend.go","position":43,"original_position":43,"commit_id":"8685a28afbbd0a9a790a2a5758a6a35d14c7482a","original_commit_id":"8685a28afbbd0a9a790a2a5758a6a35d14c7482a","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"exported function SnapshotDir should have comment or be unexported","created_at":"2016-09-03T12:04:48Z","updated_at":"2016-09-03T12:04:48Z","html_url":"https://github.com/restic/restic/pull/600#discussion_r77435962","pull_request_url":"https://api.github.com/repos/restic/restic/pulls/600","_links":{"self":{"href":"https://api.github.com/repos/restic/restic/pulls/comments/77435962"},"html":{"href":"https://github.com/restic/restic/pull/600#discussion_r77435962"},"pull_request":{"href":"https://api.github.com/repos/restic/restic/pulls/600"}}},"pull_request":{"url":"https://api.github.com/repos/restic/restic/pulls/600","id":83486425,"html_url":"https://github.com/restic/restic/pull/600","diff_url":"https://github.com/restic/restic/pull/600.diff","patch_url":"https://github.com/restic/restic/pull/600.patch","issue_url":"https://api.github.com/repos/restic/restic/issues/600","number":600,"state":"open","locked":false,"title":"WIP: restructure code","user":{"login":"fd0","id":123276,"avatar_url":"https://avatars.githubusercontent.com/u/123276?v=3","gravatar_id":"","url":"https://api.github.com/users/fd0","html_url":"https://github.com/fd0","followers_url":"https://api.github.com/users/fd0/followers","following_url":"https://api.github.com/users/fd0/following{/other_user}","gists_url":"https://api.github.com/users/fd0/gists{/gist_id}","starred_url":"https://api.github.com/users/fd0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fd0/subscriptions","organizations_url":"https://api.github.com/users/fd0/orgs","repos_url":"https://api.github.com/users/fd0/repos","events_url":"https://api.github.com/users/fd0/events{/privacy}","received_events_url":"https://api.github.com/users/fd0/received_events","type":"User","site_admin":false},"body":"This is my work in progress PR for restructuring the restic code, the rough idea is described in this talk:\r\nhttps://go-talks.appspot.com/github.com/gophercon/2016-talks/BenJohnson-StructuringApplicationsForGrowth/main.slide#1\r\n\r\nBasically, we'll move all data types (structs) to the package `restic` (`Node`, `Tree`, `Snapshot`, ...) and add interfaces for everything that is defined by the behavior (`Backend`, `Repository`, `Archiver`, ...).\r\n\r\nThere will be a new `restic/mock` package which contains mock implementations for all interfaces.\r\n\r\nAll sub-packages depend on package `restic`, which in turn cannot depend on anything.\r\n\r\nThis will, unfortunately, be a really huge and completely unreadable diff.","created_at":"2016-08-31T16:31:10Z","updated_at":"2016-09-03T12:04:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a0cf747510b360f62febb1608ac755fba80808f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/restic/restic/pulls/600/commits","review_comments_url":"https://api.github.com/repos/restic/restic/pulls/600/comments","review_comment_url":"https://api.github.com/repos/restic/restic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/restic/restic/issues/600/comments","statuses_url":"https://api.github.com/repos/restic/restic/statuses/8685a28afbbd0a9a790a2a5758a6a35d14c7482a","head":{"label":"restic:restructure","ref":"restructure","sha":"8685a28afbbd0a9a790a2a5758a6a35d14c7482a","user":{"login":"restic","id":10073512,"avatar_url":"https://avatars.githubusercontent.com/u/10073512?v=3","gravatar_id":"","url":"https://api.github.com/users/restic","html_url":"https://github.com/restic","followers_url":"https://api.github.com/users/restic/followers","following_url":"https://api.github.com/users/restic/following{/other_user}","gists_url":"https://api.github.com/users/restic/gists{/gist_id}","starred_url":"https://api.github.com/users/restic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/restic/subscriptions","organizations_url":"https://api.github.com/users/restic/orgs","repos_url":"https://api.github.com/users/restic/repos","events_url":"https://api.github.com/users/restic/events{/privacy}","received_events_url":"https://api.github.com/users/restic/received_events","type":"Organization","site_admin":false},"repo":{"id":19205896,"name":"restic","full_name":"restic/restic","owner":{"login":"restic","id":10073512,"avatar_url":"https://avatars.githubusercontent.com/u/10073512?v=3","gravatar_id":"","url":"https://api.github.com/users/restic","html_url":"https://github.com/restic","followers_url":"https://api.github.com/users/restic/followers","following_url":"https://api.github.com/users/restic/following{/other_user}","gists_url":"https://api.github.com/users/restic/gists{/gist_id}","starred_url":"https://api.github.com/users/restic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/restic/subscriptions","organizations_url":"https://api.github.com/users/restic/orgs","repos_url":"https://api.github.com/users/restic/repos","events_url":"https://api.github.com/users/restic/events{/privacy}","received_events_url":"https://api.github.com/users/restic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/restic/restic","description":"restic backup program","fork":false,"url":"https://api.github.com/repos/restic/restic","forks_url":"https://api.github.com/repos/restic/restic/forks","keys_url":"https://api.github.com/repos/restic/restic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/restic/restic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/restic/restic/teams","hooks_url":"https://api.github.com/repos/restic/restic/hooks","issue_events_url":"https://api.github.com/repos/restic/restic/issues/events{/number}","events_url":"https://api.github.com/repos/restic/restic/events","assignees_url":"https://api.github.com/repos/restic/restic/assignees{/user}","branches_url":"https://api.github.com/repos/restic/restic/branches{/branch}","tags_url":"https://api.github.com/repos/restic/restic/tags","blobs_url":"https://api.github.com/repos/restic/restic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/restic/restic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/restic/restic/git/refs{/sha}","trees_url":"https://api.github.com/repos/restic/restic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/restic/restic/statuses/{sha}","languages_url":"https://api.github.com/repos/restic/restic/languages","stargazers_url":"https://api.github.com/repos/restic/restic/stargazers","contributors_url":"https://api.github.com/repos/restic/restic/contributors","subscribers_url":"https://api.github.com/repos/restic/restic/subscribers","subscription_url":"https://api.github.com/repos/restic/restic/subscription","commits_url":"https://api.github.com/repos/restic/restic/commits{/sha}","git_commits_url":"https://api.github.com/repos/restic/restic/git/commits{/sha}","comments_url":"https://api.github.com/repos/restic/restic/comments{/number}","issue_comment_url":"https://api.github.com/repos/restic/restic/issues/comments{/number}","contents_url":"https://api.github.com/repos/restic/restic/contents/{+path}","compare_url":"https://api.github.com/repos/restic/restic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/restic/restic/merges","archive_url":"https://api.github.com/repos/restic/restic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/restic/restic/downloads","issues_url":"https://api.github.com/repos/restic/restic/issues{/number}","pulls_url":"https://api.github.com/repos/restic/restic/pulls{/number}","milestones_url":"https://api.github.com/repos/restic/restic/milestones{/number}","notifications_url":"https://api.github.com/repos/restic/restic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/restic/restic/labels{/name}","releases_url":"https://api.github.com/repos/restic/restic/releases{/id}","deployments_url":"https://api.github.com/repos/restic/restic/deployments","created_at":"2014-04-27T14:07:58Z","updated_at":"2016-09-01T16:08:48Z","pushed_at":"2016-09-03T12:04:27Z","git_url":"git://github.com/restic/restic.git","ssh_url":"git@github.com:restic/restic.git","clone_url":"https://github.com/restic/restic.git","svn_url":"https://github.com/restic/restic","homepage":"https://restic.github.io/","size":15180,"stargazers_count":811,"watchers_count":811,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":122,"forks":75,"open_issues":122,"watchers":811,"default_branch":"master"}},"base":{"label":"restic:master","ref":"master","sha":"9ce40761c83f90acb52f729420f52d7ceb500f6f","user":{"login":"restic","id":10073512,"avatar_url":"https://avatars.githubusercontent.com/u/10073512?v=3","gravatar_id":"","url":"https://api.github.com/users/restic","html_url":"https://github.com/restic","followers_url":"https://api.github.com/users/restic/followers","following_url":"https://api.github.com/users/restic/following{/other_user}","gists_url":"https://api.github.com/users/restic/gists{/gist_id}","starred_url":"https://api.github.com/users/restic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/restic/subscriptions","organizations_url":"https://api.github.com/users/restic/orgs","repos_url":"https://api.github.com/users/restic/repos","events_url":"https://api.github.com/users/restic/events{/privacy}","received_events_url":"https://api.github.com/users/restic/received_events","type":"Organization","site_admin":false},"repo":{"id":19205896,"name":"restic","full_name":"restic/restic","owner":{"login":"restic","id":10073512,"avatar_url":"https://avatars.githubusercontent.com/u/10073512?v=3","gravatar_id":"","url":"https://api.github.com/users/restic","html_url":"https://github.com/restic","followers_url":"https://api.github.com/users/restic/followers","following_url":"https://api.github.com/users/restic/following{/other_user}","gists_url":"https://api.github.com/users/restic/gists{/gist_id}","starred_url":"https://api.github.com/users/restic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/restic/subscriptions","organizations_url":"https://api.github.com/users/restic/orgs","repos_url":"https://api.github.com/users/restic/repos","events_url":"https://api.github.com/users/restic/events{/privacy}","received_events_url":"https://api.github.com/users/restic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/restic/restic","description":"restic backup program","fork":false,"url":"https://api.github.com/repos/restic/restic","forks_url":"https://api.github.com/repos/restic/restic/forks","keys_url":"https://api.github.com/repos/restic/restic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/restic/restic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/restic/restic/teams","hooks_url":"https://api.github.com/repos/restic/restic/hooks","issue_events_url":"https://api.github.com/repos/restic/restic/issues/events{/number}","events_url":"https://api.github.com/repos/restic/restic/events","assignees_url":"https://api.github.com/repos/restic/restic/assignees{/user}","branches_url":"https://api.github.com/repos/restic/restic/branches{/branch}","tags_url":"https://api.github.com/repos/restic/restic/tags","blobs_url":"https://api.github.com/repos/restic/restic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/restic/restic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/restic/restic/git/refs{/sha}","trees_url":"https://api.github.com/repos/restic/restic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/restic/restic/statuses/{sha}","languages_url":"https://api.github.com/repos/restic/restic/languages","stargazers_url":"https://api.github.com/repos/restic/restic/stargazers","contributors_url":"https://api.github.com/repos/restic/restic/contributors","subscribers_url":"https://api.github.com/repos/restic/restic/subscribers","subscription_url":"https://api.github.com/repos/restic/restic/subscription","commits_url":"https://api.github.com/repos/restic/restic/commits{/sha}","git_commits_url":"https://api.github.com/repos/restic/restic/git/commits{/sha}","comments_url":"https://api.github.com/repos/restic/restic/comments{/number}","issue_comment_url":"https://api.github.com/repos/restic/restic/issues/comments{/number}","contents_url":"https://api.github.com/repos/restic/restic/contents/{+path}","compare_url":"https://api.github.com/repos/restic/restic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/restic/restic/merges","archive_url":"https://api.github.com/repos/restic/restic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/restic/restic/downloads","issues_url":"https://api.github.com/repos/restic/restic/issues{/number}","pulls_url":"https://api.github.com/repos/restic/restic/pulls{/number}","milestones_url":"https://api.github.com/repos/restic/restic/milestones{/number}","notifications_url":"https://api.github.com/repos/restic/restic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/restic/restic/labels{/name}","releases_url":"https://api.github.com/repos/restic/restic/releases{/id}","deployments_url":"https://api.github.com/repos/restic/restic/deployments","created_at":"2014-04-27T14:07:58Z","updated_at":"2016-09-01T16:08:48Z","pushed_at":"2016-09-03T12:04:27Z","git_url":"git://github.com/restic/restic.git","ssh_url":"git@github.com:restic/restic.git","clone_url":"https://github.com/restic/restic.git","svn_url":"https://github.com/restic/restic","homepage":"https://restic.github.io/","size":15180,"stargazers_count":811,"watchers_count":811,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":122,"forks":75,"open_issues":122,"watchers":811,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/restic/restic/pulls/600"},"html":{"href":"https://github.com/restic/restic/pull/600"},"issue":{"href":"https://api.github.com/repos/restic/restic/issues/600"},"comments":{"href":"https://api.github.com/repos/restic/restic/issues/600/comments"},"review_comments":{"href":"https://api.github.com/repos/restic/restic/pulls/600/comments"},"review_comment":{"href":"https://api.github.com/repos/restic/restic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/restic/restic/pulls/600/commits"},"statuses":{"href":"https://api.github.com/repos/restic/restic/statuses/8685a28afbbd0a9a790a2a5758a6a35d14c7482a"}}}}
{"actor":{"display_login":"houndci-bot"}}