mirror of
https://github.com/restic/restic.git
synced 2026-08-03 12:42:17 +00:00
repository: unexport NewChecker
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user