repository: unexport NewChecker

This commit is contained in:
Michael Eischer
2026-06-13 19:48:02 +02:00
parent 35caceace4
commit d62e42e620
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -79,8 +79,8 @@ type Checker struct {
repo *Repository
}
// NewChecker creates a new Checker.
func NewChecker(repo *Repository) *Checker {
// newChecker creates a new Checker.
func newChecker(repo *Repository) *Checker {
return &Checker{
repo: repo,
}
+1 -1
View File
@@ -159,7 +159,7 @@ func setupChecker(t *testing.T, wrap func(backend.Backend) backend.Backend) *Che
// Re-open the same backend (now containing real pack files) through
// the corruption wrapper so the checker reads corrupted data.
checkRepo := TestOpenBackend(t, wrap(be))
chkr := NewChecker(checkRepo)
chkr := newChecker(checkRepo)
// make sure the index is loaded
err := checkRepo.LoadIndex(context.TODO(), nil)
+1 -1
View File
@@ -180,7 +180,7 @@ func (r *Repository) SetDryRun() {
}
func (r *Repository) Checker() *Checker {
return NewChecker(r)
return newChecker(r)
}
// LoadUnpacked loads and decrypts the file with the given type and ID.
+1 -1
View File
@@ -165,7 +165,7 @@ func TestNewLock(_ *testing.T, repo *Repository, exclusive bool) (*restic.Lock,
// TestCheckRepo runs the checker on repo.
func TestCheckRepo(t testing.TB, repo *Repository) {
chkr := NewChecker(repo)
chkr := newChecker(repo)
hints, errs := chkr.LoadIndex(context.TODO(), nil)
if len(errs) != 0 {