mirror of
https://github.com/restic/restic.git
synced 2026-11-03 22:09:21 +00:00
Fix linter errors (except for tests)
This commit is contained in:
1 parent
a8cda0119c
commit
c0514dd8ba
36 files changed
+61
-56
No files matched your search
@@ -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
|
||||
|
||||
@@ -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())
|
||||
},
|
||||
})
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user