index: convert to implement modern go iterators

This commit is contained in:
Michael Eischer committed 2025-11-16 12:56:37 +01:00
1 parent 0624b656b8
commit 38c543457e
11 files changed
+124 -101

No files matched your search

+2 -2
View File
@@ -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 {