MSP-5014 Try get rid of global service and autocomplete
This commit is contained in:
1 parent
84f639a9d3
commit
c267b1ae6e
15 files changed
+468
-335
No files matched your search
@@ -2,11 +2,14 @@ package utils
|
||||
|
||||
import (
|
||||
"ispctl/model"
|
||||
"ispctl/service"
|
||||
)
|
||||
|
||||
func CreateUpdateConfig(stringToChange string, configuration *model.Config) error {
|
||||
answer, err := service.Config.CreateUpdateConfig(stringToChange, configuration)
|
||||
type UpdateConfigService interface {
|
||||
CreateUpdateConfig(stringToChange string, configuration *model.Config) (map[string]any, error)
|
||||
}
|
||||
|
||||
func CreateUpdateConfig(stringToChange string, configuration *model.Config, service UpdateConfigService) error {
|
||||
answer, err := service.CreateUpdateConfig(stringToChange, configuration)
|
||||
if err != nil {
|
||||
return err
|
||||
} else if answer != nil {
|
||||
|
||||
Reference in new issue
Block a user