Merge pull request #5560 from MichaelEischer/index-iterators

index: port to  modern Go iterators
This commit is contained in:
Michael Eischer authored and GitHub committed 2025-11-16 13:24:48 +01:00
commit 14f3bc8232
13 files changed
+172 -135

No files matched your search

+6 -2
View File
@@ -73,9 +73,13 @@ func runList(ctx context.Context, gopts global.Options, args []string, term ui.T
if err != nil {
return err
}
return idx.Each(ctx, func(blobs restic.PackedBlob) {
for blobs := range idx.Values() {
if ctx.Err() != nil {
return ctx.Err()
}
printer.S("%v %v", blobs.Type, blobs.ID)
})
}
return nil
})
default:
return errors.Fatal("invalid type")