MSP-5014 remove common configs api
This commit is contained in:
1 parent
4bd6226cc5
commit
8889dce37c
19 files changed
+119
-836
No files matched your search
@@ -11,7 +11,6 @@ import (
|
||||
|
||||
const (
|
||||
CommonConfigName bashArg = "config_name"
|
||||
CommonConfigData bashArg = "config_data"
|
||||
ModuleName bashArg = "module_name"
|
||||
ModuleData bashArg = "module_data"
|
||||
Empty bashArg = "empty"
|
||||
@@ -35,10 +34,6 @@ func (c bashCommand) Complete(ctx *cli.Context) {
|
||||
if err := flag.CheckGlobal(ctx); err != nil {
|
||||
return
|
||||
}
|
||||
commonConfigs, err := service.Config.GetMapNameCommonConfig()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
switch ctx.NArg() {
|
||||
case 0:
|
||||
switch c.first {
|
||||
@@ -50,19 +45,9 @@ func (c bashCommand) Complete(ctx *cli.Context) {
|
||||
fmt.Println(module.Name)
|
||||
}
|
||||
}
|
||||
case CommonConfigName:
|
||||
for _, config := range commonConfigs {
|
||||
fmt.Println(config.Name)
|
||||
}
|
||||
}
|
||||
case 1:
|
||||
switch c.second {
|
||||
case CommonConfigData:
|
||||
if config, ok := commonConfigs[ctx.Args().First()]; ok {
|
||||
for key, _ := range bellows.Flatten(config.Data) {
|
||||
fmt.Printf(".%v\n", key)
|
||||
}
|
||||
}
|
||||
case ModuleName:
|
||||
if arrayOfModules, err := service.Config.GetAvailableConfigs(); err != nil {
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user