mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
cleanup: remove unused service command functions from commands.go
Remove all unused service command functions (initStartCmd, initStopCmd, initRestartCmd, initReloadCmd, initStatusCmd, initUninstallCmd, initInterfacesCmd, initClientsCmd, initUpgradeCmd, initServicesCmd) from commands.go since they have been replaced by modular implementations in dedicated files. Keep only essential functions: CommandRunner interface, ServiceManager struct, NewServiceManager function, Status method, initRunCmd function, and filterEmptyStrings function. Update cli.go to use InitClientsCmd() and InitUpgradeCmd() instead of the old init functions. Clean up unused imports and simplify filterEmptyStrings implementation. This reduces commands.go from 1202 lines to 103 lines (91% reduction) and eliminates code duplication while improving maintainability.
This commit is contained in:
committed by
Cuong Manh Le
parent
13b15e642d
commit
af9386568f
@@ -129,8 +129,8 @@ func initCLI() {
|
||||
|
||||
initRunCmd()
|
||||
InitServiceCmd()
|
||||
initClientsCmd()
|
||||
initUpgradeCmd()
|
||||
InitClientsCmd()
|
||||
InitUpgradeCmd()
|
||||
InitLogCmd()
|
||||
}
|
||||
|
||||
|
||||
1113
cmd/cli/commands.go
1113
cmd/cli/commands.go
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user