修改代码符合规范

This commit is contained in:
dushixiang
2022-01-23 18:09:31 +08:00
parent a372e8ae8c
commit d8377bf06c
7 changed files with 21 additions and 15 deletions

View File

@ -22,7 +22,7 @@ func NewNextTerminal(ip string, port int, username, password, privateKey, passph
if err != nil {
return nil, err
}
return newNT(err, sshClient, pipe, recording, term, rows, cols)
return newNT(sshClient, pipe, recording, term, rows, cols)
}
func NewNextTerminalUseSocks(ip string, port int, username, password, privateKey, passphrase string, rows, cols int, recording, term string, pipe bool, socksProxyHost, socksProxyPort, socksProxyUsername, socksProxyPassword string) (*NextTerminal, error) {
@ -30,10 +30,10 @@ func NewNextTerminalUseSocks(ip string, port int, username, password, privateKey
if err != nil {
return nil, err
}
return newNT(err, sshClient, pipe, recording, term, rows, cols)
return newNT(sshClient, pipe, recording, term, rows, cols)
}
func newNT(err error, sshClient *ssh.Client, pipe bool, recording string, term string, rows int, cols int) (*NextTerminal, error) {
func newNT(sshClient *ssh.Client, pipe bool, recording string, term string, rows int, cols int) (*NextTerminal, error) {
sshSession, err := sshClient.NewSession()
if err != nil {
return nil, err