mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
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.