check: refactor pack selection for read data

Drop the `packs` map from the internal state of the checker. Instead the
Packs(...) method now calls a filter callback that can select the
packs intended for checking.
This commit is contained in:
Michael Eischer
2025-10-03 22:46:43 +02:00
parent 3ae6a69154
commit b7bbb408ee
5 changed files with 96 additions and 78 deletions
+3 -1
View File
@@ -186,7 +186,9 @@ func TestCheckRepo(t testing.TB, repo *Repository) {
// read data
errChan = make(chan error)
go chkr.ReadData(context.TODO(), errChan)
go chkr.ReadPacks(context.TODO(), func(packs map[restic.ID]int64) map[restic.ID]int64 {
return packs
}, nil, errChan)
for err := range errChan {
t.Error(err)