@@ -107,31 +107,33 @@ func handleDB(r *Rouse, cfg *config.AppConfig) *exec.Cmd {
107
107
connectMap ["protocol" ] = "mssql_jdbc_ms_new"
108
108
}
109
109
if r .Protocol == "redis" {
110
- var conList []map [string ]string
111
- ss := make (map [string ]string )
112
- ss ["host" ] = r .Host
113
- ss ["port" ] = strconv .Itoa (r .Port )
114
- ss ["name" ] = r .getName ()
115
- ss ["auth" ] = r .Token .ID + "@" + r .Value
116
- ss ["ssh_agent_path" ] = ""
117
- ss ["ssh_password" ] = ""
118
- ss ["ssh_private_key_path" ] = ""
119
- ss ["timeout_connect" ] = "60000"
120
- ss ["timeout_execute" ] = "60000"
121
- conList = append (conList , ss )
110
+ if appItem .Name == "resp" {
111
+ var conList []map [string ]string
112
+ ss := make (map [string ]string )
113
+ ss ["host" ] = r .Host
114
+ ss ["port" ] = strconv .Itoa (r .Port )
115
+ ss ["name" ] = r .getName ()
116
+ ss ["auth" ] = r .Token .ID + "@" + r .Value
117
+ ss ["ssh_agent_path" ] = ""
118
+ ss ["ssh_password" ] = ""
119
+ ss ["ssh_private_key_path" ] = ""
120
+ ss ["timeout_connect" ] = "60000"
121
+ ss ["timeout_execute" ] = "60000"
122
+ conList = append (conList , ss )
122
123
123
- bjson , _ := json .Marshal (conList )
124
- currentPath := filepath .Dir (os .Args [0 ])
125
- rdmPath := filepath .Join (currentPath , ".rdm" )
126
- EnsureDirExist (rdmPath )
127
- filePath := filepath .Join (rdmPath , "connections.json" )
128
- global .LOG .Error (filePath )
129
- err := ioutil .WriteFile (filePath , bjson , os .ModePerm )
130
- if err != nil {
131
- global .LOG .Error (err .Error ())
132
- return nil
124
+ bjson , _ := json .Marshal (conList )
125
+ currentPath := filepath .Dir (os .Args [0 ])
126
+ rdmPath := filepath .Join (currentPath , ".rdm" )
127
+ EnsureDirExist (rdmPath )
128
+ filePath := filepath .Join (rdmPath , "connections.json" )
129
+ global .LOG .Error (filePath )
130
+ err := ioutil .WriteFile (filePath , bjson , os .ModePerm )
131
+ if err != nil {
132
+ global .LOG .Error (err .Error ())
133
+ return nil
134
+ }
135
+ connectMap ["config_file" ] = currentPath
133
136
}
134
- connectMap ["config_file" ] = currentPath
135
137
}
136
138
commands := getCommandFromArgs (connectMap , appItem .ArgFormat )
137
139
if strings .Contains (commands , "*" ) {
0 commit comments