mirror of
https://github.com/restic/restic.git
synced 2026-10-12 21:17:12 +00:00
Add ForAllSnapshots
This commit is contained in:
1 parent
058b102db0
commit
5b9ee56335
3 files changed
+18
-12
No files matched your search
@@ -55,8 +55,7 @@ func prettyPrintJSON(wr io.Writer, item interface{}) error {
|
||||
}
|
||||
|
||||
func debugPrintSnapshots(ctx context.Context, repo *repository.Repository, wr io.Writer) error {
|
||||
return repo.List(ctx, restic.SnapshotFile, func(id restic.ID, size int64) error {
|
||||
snapshot, err := restic.LoadSnapshot(ctx, repo, id)
|
||||
return restic.ForAllSnapshots(ctx, repo, nil, func(id restic.ID, snapshot *restic.Snapshot, err error) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user