|
1 | 1 | package cmd |
2 | 2 |
|
3 | 3 | import ( |
4 | | - "github.com/hurtki/configsManager/services" |
5 | | - syncServices "github.com/hurtki/configsManager/services/sync" |
| 4 | + sync_cmd "github.com/hurtki/configsManager/cmd/sync" |
6 | 5 | "github.com/spf13/cobra" |
7 | 6 | ) |
8 | 7 |
|
9 | 8 | // rootCmd represents the base command when called without any subcommands |
10 | 9 | var rootCmd = &cobra.Command{ |
11 | 10 | Use: "cm", |
12 | 11 | Short: "A CLI tool to manage configuration file paths by keys", |
13 | | - Long: `ConfigManager is a simple and efficient CLI application that helps you |
| 12 | + Long: `ConfigManager is a simple and efficient CLI application that helps you |
14 | 13 | manage your configuration files by associating keys with file paths. |
15 | 14 |
|
16 | 15 | With configManager, you can: |
@@ -43,18 +42,18 @@ func init() { |
43 | 42 | rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") |
44 | 43 | } |
45 | 44 |
|
46 | | -func NewRootCmd(AppConfigService services.AppConfigService, |
47 | | - InputService services.InputService, |
48 | | - ConfigsListService services.ConfigsListService, |
49 | | - OsService services.OsService, |
50 | | - SyncService syncServices.SyncService, |
| 45 | +func NewRootCmd(AppConfigService AppConfigService, |
| 46 | + InputService InputService, |
| 47 | + ConfigsListService ConfigsListService, |
| 48 | + OsService OsService, |
| 49 | + SyncService sync_cmd.SyncService, |
51 | 50 | ) *cobra.Command { |
52 | 51 | // creating commands with dependencies |
53 | 52 | addCmd := NewAddCmd(AppConfigService, InputService, ConfigsListService, OsService) |
54 | 53 | catCmd := NewCatCmd(AppConfigService, ConfigsListService, OsService) |
55 | 54 | keysCmd := NewKeysCmd(AppConfigService, ConfigsListService) |
56 | 55 | openCmd := NewOpenCmd(AppConfigService, ConfigsListService, OsService) |
57 | | - pathCmd := NewPathCmd(AppConfigService, ConfigsListService) |
| 56 | + pathCmd := NewPathCmd(ConfigsListService) |
58 | 57 | rmCmd := NewRmCmd(AppConfigService, ConfigsListService) |
59 | 58 | initCmd := NewInitCmd(AppConfigService, ConfigsListService) |
60 | 59 | syncCmd := NewSyncCmd(AppConfigService, ConfigsListService, OsService, SyncService) |
|
0 commit comments