1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-09 00:00:02 +01:00

restic check with snapshots

fixed lint errors
This commit is contained in:
Winfried Plappert 2025-02-04 21:28:53 +00:00
parent c141ed1a17
commit 5e11147311

View file

@ -522,11 +522,12 @@ func (c *Checker) ReadPacks(ctx context.Context, packs map[restic.ID]int64, p *p
}
}
// process snapshot IDs from command line
// CheckWithSnapshots will process snapshot IDs from command line and
// madify c.packs so it contains only the selected packfiles via snapshotFilter
func (c *Checker) CheckWithSnapshots(ctx context.Context, repo *repository.Repository, args []string, snapshotFilter *restic.SnapshotFilter) (bool, error) {
selectedTrees := []restic.ID{}
err := snapshotFilter.FindAll(ctx, c.snapshots, repo, args, func(id string, sn *restic.Snapshot, err error) error {
err := snapshotFilter.FindAll(ctx, c.snapshots, repo, args, func(_ string, sn *restic.Snapshot, err error) error {
if err != nil {
return err
} else if ctx.Err() != nil {