refactor: clean up code

This commit is contained in:
Jonas Kaninda
2024-10-21 08:02:57 +02:00
parent 0089e8ed6d
commit 01c5a061c5
5 changed files with 14 additions and 21 deletions

View File

@@ -45,7 +45,7 @@ func moveToBackup(backupFileName string, destinationPath string) {
utils.Error("Error deleting file: %s", err)
}
utils.Done("Database has been backed up and copied to %s", filepath.Join(destinationPath, backupFileName))
utils.Info("Database has been backed up and copied to %s", filepath.Join(destinationPath, backupFileName))
}
func deleteOldBackup(retentionDays int) {
utils.Info("Deleting old backups...")
@@ -60,7 +60,7 @@ func deleteOldBackup(retentionDays int) {
if err != nil {
utils.Fatal("Error:", err)
} else {
utils.Done("File %s deleted successfully", filePath)
utils.Info("File %s deleted successfully", filePath)
}
return err
}
@@ -87,7 +87,7 @@ func deleteOldBackup(retentionDays int) {
utils.Fatal("Error:", err)
return
}
utils.Done("Deleting old backups...done")
utils.Info("Deleting old backups...done")
}
func deleteTemp() {
utils.Info("Deleting %s ...", tmpPath)