refactor: refactoring of code to meet all golangci-lint requirements
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// Package cmd /
|
||||
/*****
|
||||
/*
|
||||
****
|
||||
@author Jonas Kaninda
|
||||
@license MIT License <https://opensource.org/licenses/MIT>
|
||||
@Copyright © 2024 Jonas Kaninda
|
||||
@@ -8,6 +9,7 @@ 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,7 +22,7 @@ var RestoreCmd = &cobra.Command{
|
||||
if len(args) == 0 {
|
||||
internal.StartRestore(cmd)
|
||||
} else {
|
||||
utils.Fatal(`"restore" accepts no argument %q`, args)
|
||||
logger.Fatal(`"restore" accepts no argument %q`, args)
|
||||
|
||||
}
|
||||
|
||||
@@ -28,7 +30,7 @@ var RestoreCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
//Restore
|
||||
// Restore
|
||||
RestoreCmd.PersistentFlags().StringP("file", "f", "", "File name of database")
|
||||
RestoreCmd.PersistentFlags().StringP("storage", "s", "local", "Define storage: local, s3, ssh, ftp")
|
||||
RestoreCmd.PersistentFlags().StringP("path", "P", "", "AWS S3 path without file name. eg: /custom_path or ssh remote path `/home/foo/backup`")
|
||||
|
||||
Reference in New Issue
Block a user