errcheck: More error handling

This commit is contained in:
Alexander Neumann
2021-01-30 16:46:34 +01:00
parent 16313bfcc9
commit 3c753c071c
5 changed files with 32 additions and 12 deletions

View File

@@ -327,7 +327,12 @@ func (c *Checker) Structure(ctx context.Context, p *progress.Counter, errChan ch
})
}
wg.Wait()
// the wait group should not return an error because no worker returns an
// error, so panic if that has changed somehow.
err := wg.Wait()
if err != nil {
panic(err)
}
}
func (c *Checker) checkTree(id restic.ID, tree *restic.Tree) (errs []error) {