refactor: refactoring of code to meet all golangci-lint requirements
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
// Package cmd /
|
||||
/*****
|
||||
@author Jonas Kaninda
|
||||
@license MIT License <https://opensource.org/licenses/MIT>
|
||||
@Copyright © 2024 Jonas Kaninda
|
||||
**/
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/jkaninda/pg-bkup/internal"
|
||||
"github.com/jkaninda/pg-bkup/pkg/logger"
|
||||
"github.com/jkaninda/pg-bkup/utils"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
@@ -20,14 +16,14 @@ var BackupCmd = &cobra.Command{
|
||||
if len(args) == 0 {
|
||||
internal.StartBackup(cmd)
|
||||
} else {
|
||||
utils.Fatal(`"backup" accepts no argument %q`, args)
|
||||
logger.Fatal(`"backup" accepts no argument %q`, args)
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
//Backup
|
||||
// Backup
|
||||
BackupCmd.PersistentFlags().StringP("storage", "s", "local", "Define storage: local, s3, ssh, ftp")
|
||||
BackupCmd.PersistentFlags().StringP("path", "P", "", "AWS S3 path without file name. eg: /custom_path or ssh remote path `/home/foo/backup`")
|
||||
BackupCmd.PersistentFlags().StringP("cron-expression", "", "", "Backup cron expression")
|
||||
|
||||
Reference in New Issue
Block a user