Some linter cleanup

This commit is contained in:
Gabe Kangas
2021-06-29 10:21:00 -07:00
parent ab3bbd59bf
commit 12104978e8
10 changed files with 19 additions and 19 deletions

View File

@@ -22,18 +22,18 @@ func Restore(backupFile string, databaseFile string) error {
data, err := ioutil.ReadFile(backupFile)
if err != nil {
return errors.New(fmt.Sprintf("Unable to read backup file %s", err))
return fmt.Errorf("Unable to read backup file %s", err)
}
gz, err := gzip.NewReader(bytes.NewBuffer(data))
if err != nil {
return errors.New(fmt.Sprintf("Unable to read backup file %s", err))
return fmt.Errorf("Unable to read backup file %s", err)
}
defer gz.Close()
var b bytes.Buffer
if _, err := io.Copy(&b, gz); err != nil {
return errors.New(fmt.Sprintf("Unable to read backup file %s", err))
return fmt.Errorf("Unable to read backup file %s", err)
}
defer gz.Close()