small cleanup:

- be explicit when discarding returned errors from .Close(), etc.
- remove named return values from funcs when naked return not used
- fix some "err" shadowing when redeclaration not needed
This commit is contained in:
George Armhold 2017-10-25 12:03:55 -04:00
parent 8d37b723ca
commit bcdebfb84e
8 changed files with 12 additions and 11 deletions

View file

@ -674,8 +674,8 @@ func checkPack(ctx context.Context, r restic.Repository, id restic.ID) error {
}
defer func() {
packfile.Close()
os.Remove(packfile.Name())
_ = packfile.Close()
_ = os.Remove(packfile.Name())
}()
hrd := hashing.NewReader(rd, sha256.New())