From 37b2fb6303903b0dce604300590e165f009cfb56 Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Wed, 23 Oct 2024 12:00:41 +0200 Subject: [PATCH] refactor: clean up --- pkg/restore.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pkg/restore.go b/pkg/restore.go index 888d473..56918b3 100644 --- a/pkg/restore.go +++ b/pkg/restore.go @@ -7,6 +7,10 @@ package pkg import ( + "os" + "os/exec" + "path/filepath" + "github.com/jkaninda/encryptor" "github.com/jkaninda/go-storage/pkg/ftp" "github.com/jkaninda/go-storage/pkg/local" @@ -14,9 +18,6 @@ import ( "github.com/jkaninda/go-storage/pkg/ssh" "github.com/jkaninda/pg-bkup/utils" "github.com/spf13/cobra" - "os" - "os/exec" - "path/filepath" ) func StartRestore(cmd *cobra.Command) { @@ -52,10 +53,6 @@ func localRestore(dbConf *dbConfig, restoreConf *RestoreConfig) { } func restoreFromS3(db *dbConfig, conf *RestoreConfig) { utils.Info("Restore database from s3") - //err := DownloadFile(tmpPath, conf.file, conf.bucket, conf.s3Path) - //if err != nil { - // utils.Fatal("Error download file from s3 %s %v ", conf.file, err) - //} awsConfig := initAWSConfig() if conf.remotePath == "" { conf.remotePath = awsConfig.remotePath