mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-05-27 12:52:27 +02:00
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.
This commit is contained in:
committed by
Cuong Manh Le
parent
33dd720d80
commit
a61cb1f5bf
@@ -79,13 +79,6 @@ var logf = func(format string, args ...any) {
|
||||
//lint:ignore U1000 use in newLoopbackOSConfigurator
|
||||
var noopLogf = func(format string, args ...any) {}
|
||||
|
||||
var svcConfig = &service.Config{
|
||||
Name: ctrldServiceName,
|
||||
DisplayName: "Control-D Helper Service",
|
||||
Description: "A highly configurable, multi-protocol DNS forwarding proxy",
|
||||
Option: service.KeyValue{},
|
||||
}
|
||||
|
||||
var useSystemdResolved = false
|
||||
|
||||
type prog struct {
|
||||
|
||||
Reference in New Issue
Block a user