From 5e1114731176a31772ff96a3b2df315cce343204 Mon Sep 17 00:00:00 2001 From: Winfried Plappert Date: Tue, 4 Feb 2025 21:28:53 +0000 Subject: [PATCH] restic check with snapshots fixed lint errors --- internal/checker/checker.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/checker/checker.go b/internal/checker/checker.go index 2ac2b3615..9a07f6e4a 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -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 {