Fix linter errors (except for tests)

This commit is contained in:
Alexander Neumann committed 2024-02-10 22:58:10 +01:00
1 parent a8cda0119c
commit c0514dd8ba
36 files changed
+61 -56

No files matched your search

+1 -1
View File
@@ -136,7 +136,7 @@ func SearchKey(ctx context.Context, s *Repository, password string, maxKeys int,
defer cancel()
// try at most maxKeys keys in repo
err = s.List(listCtx, restic.KeyFile, func(id restic.ID, size int64) error {
err = s.List(listCtx, restic.KeyFile, func(id restic.ID, _ int64) error {
checked++
if maxKeys > 0 && checked > maxKeys {
return ErrMaxKeysReached
+1 -1
View File
@@ -68,7 +68,7 @@ func RepairPacks(ctx context.Context, repo restic.Repository, ids restic.IDSet,
DeleteProgress: func() *progress.Counter {
return printer.NewCounter("old indexes deleted")
},
DeleteReport: func(id restic.ID, err error) {
DeleteReport: func(id restic.ID, _ error) {
printer.VV("removed index %v", id.String())
},
})
+2 -2
View File
@@ -651,7 +651,7 @@ func (r *Repository) LoadIndex(ctx context.Context, p *progress.Counter) error {
if p != nil {
var numIndexFiles uint64
err := indexList.List(ctx, restic.IndexFile, func(id restic.ID, size int64) error {
err := indexList.List(ctx, restic.IndexFile, func(_ restic.ID, _ int64) error {
numIndexFiles++
return nil
})
@@ -662,7 +662,7 @@ func (r *Repository) LoadIndex(ctx context.Context, p *progress.Counter) error {
defer p.Done()
}
err = index.ForAllIndexes(ctx, indexList, r, func(id restic.ID, idx *index.Index, oldFormat bool, err error) error {
err = index.ForAllIndexes(ctx, indexList, r, func(_ restic.ID, idx *index.Index, _ bool, err error) error {
if err != nil {
return err
}