mirror of
https://github.com/restic/restic.git
synced 2026-11-21 13:02:42 +00:00
index: convert to implement modern go iterators
This commit is contained in:
1 parent
0624b656b8
commit
38c543457e
11 files changed
+124
-101
No files matched your search
@@ -397,13 +397,13 @@ func testRepositoryIncrementalIndex(t *testing.T, version uint) {
|
||||
idx, err := loadIndex(context.TODO(), repo, id)
|
||||
rtest.OK(t, err)
|
||||
|
||||
rtest.OK(t, idx.Each(context.TODO(), func(pb restic.PackedBlob) {
|
||||
for pb := range idx.Values() {
|
||||
if _, ok := packEntries[pb.PackID]; !ok {
|
||||
packEntries[pb.PackID] = make(map[restic.ID]struct{})
|
||||
}
|
||||
|
||||
packEntries[pb.PackID][id] = struct{}{}
|
||||
}))
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user