Commit Graph

3 Commits

Author SHA1 Message Date
Cuong Manh Le a61cb1f5bf refactor: replace direct newService calls with ServiceCommand pattern
- Replace all direct newService() calls with ServiceCommand initialization
- Update command constructors to use ServiceCommand instead of ServiceManager
- Simplify LogCommand and UpgradeCommand structs by removing serviceManager field
- Remove unused global svcConfig variable from prog.go
- Improve consistency and centralize service creation logic

This change establishes a consistent pattern for service operations across
the codebase, making it easier to maintain and extend service-related
functionality.
2026-04-30 19:19:18 +07:00
Cuong Manh Le aa8af67365 refactor: remove old initLogCmd and integrate new log command structure
Remove the old initLogCmd function from commands.go and update cli.go
to use the new InitLogCmd function from commands_log.go. Complete
the log command refactoring by adding the missing InitLogCmd function
with proper command structure and error handling.
2026-04-30 19:19:18 +07:00
Cuong Manh Le d0830a7ba2 feat: create commands_log.go and add LogCommand
Create separate file for log command handling to improve code organization.
Add LogCommand struct with SendLogs and ViewLogs methods to handle
log-related operations with proper error handling and dependency injection.
2026-04-30 19:19:18 +07:00