refactor: Restructure project files for better organization, readability, and maintainability

This commit is contained in:
2024-11-04 09:02:41 +01:00
parent 8e20e9595f
commit eb414d818c
9 changed files with 18 additions and 18 deletions

View File

@@ -7,7 +7,7 @@
package cmd
import (
"github.com/jkaninda/mysql-bkup/pkg"
"github.com/jkaninda/mysql-bkup/internal"
"github.com/jkaninda/mysql-bkup/utils"
"github.com/spf13/cobra"
)
@@ -18,7 +18,7 @@ var BackupCmd = &cobra.Command{
Example: utils.BackupExample,
Run: func(cmd *cobra.Command, args []string) {
if len(args) == 0 {
pkg.StartBackup(cmd)
internal.StartBackup(cmd)
} else {
utils.Fatal(`"backup" accepts no argument %q`, args)
}

View File

@@ -7,7 +7,7 @@
package cmd
import (
"github.com/jkaninda/mysql-bkup/pkg"
"github.com/jkaninda/mysql-bkup/internal"
"github.com/jkaninda/mysql-bkup/utils"
"github.com/spf13/cobra"
)
@@ -17,7 +17,7 @@ var MigrateCmd = &cobra.Command{
Short: "Migrate database from a source database to a target database",
Run: func(cmd *cobra.Command, args []string) {
if len(args) == 0 {
pkg.StartMigration(cmd)
internal.StartMigration(cmd)
} else {
utils.Fatal(`"migrate" accepts no argument %q`, args)

View File

@@ -1,7 +1,7 @@
package cmd
import (
"github.com/jkaninda/mysql-bkup/pkg"
"github.com/jkaninda/mysql-bkup/internal"
"github.com/jkaninda/mysql-bkup/utils"
"github.com/spf13/cobra"
)
@@ -12,7 +12,7 @@ var RestoreCmd = &cobra.Command{
Example: utils.RestoreExample,
Run: func(cmd *cobra.Command, args []string) {
if len(args) == 0 {
pkg.StartRestore(cmd)
internal.StartRestore(cmd)
} else {
utils.Fatal(`"restore" accepts no argument %q`, args)