errcheck: Add error checks

Most added checks are straight forward.
This commit is contained in:
Alexander Neumann
2021-01-30 16:32:00 +01:00
parent 1632a84e7b
commit 75f53955ee
7 changed files with 69 additions and 18 deletions

View File

@@ -201,7 +201,11 @@ func rebuildIndex(t *testing.T, repo restic.Repository) {
}
func reloadIndex(t *testing.T, repo restic.Repository) {
repo.SetIndex(repository.NewMasterIndex())
err := repo.SetIndex(repository.NewMasterIndex())
if err != nil {
t.Fatal(err)
}
if err := repo.LoadIndex(context.TODO()); err != nil {
t.Fatalf("error loading new index: %v", err)
}