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:
parent
c141ed1a17
commit
5e11147311
1 changed files with 3 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue