mirror of
https://github.com/restic/restic.git
synced 2026-05-16 07:05:24 +00:00
index: convert to implement modern go iterators
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user