mirror of
https://github.com/jkaninda/mysql-bkup.git
synced 2026-11-17 02:27:16 +00:00
refactor: refactoring of code
This commit is contained in:
1 parent
00f2fca8e4
commit
a4c37e1a4b
1 file changed
+2
-3
+2
-3
@@ -141,13 +141,12 @@ func BackupDatabase(disableCompression bool, prune bool, keepLast int) {
|
||||
log.Fatal(err)
|
||||
}
|
||||
utils.Done("Database has been backed up")
|
||||
}
|
||||
|
||||
//Delete old backup
|
||||
if prune {
|
||||
deleteOldBackup(keepLast)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
historyFile, err := os.OpenFile(fmt.Sprintf("%s/history.txt", storagePath), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
||||
Reference in new issue
Block a user