refactor: dialect使用方式调整

This commit is contained in:
meilin.huang
2024-01-29 16:02:28 +08:00
parent a743a6a05a
commit d0b71a1c40
11 changed files with 61 additions and 74 deletions

View File

@@ -93,7 +93,10 @@ func (me *MachineInfo) IfUseSshTunnelChangeIpPort() error {
func GetSshClient(m *MachineInfo, jumpClient *ssh.Client) (*ssh.Client, error) {
// 递归一直取到底层没有跳板机的机器信息
if m.SshTunnelMachine != nil {
jumpClient, _ = GetSshClient(m.SshTunnelMachine, jumpClient)
jumpClient, err := GetSshClient(m.SshTunnelMachine, jumpClient)
if err != nil {
return nil, err
}
// 新建一个没有跳板机的机器信息
m1 := &MachineInfo{
Ip: m.Ip,