mirror of
https://github.com/appleboy/drone-scp.git
synced 2026-06-14 05:12:37 +08:00
refactor: update ssh host using JoinHostPort
This commit is contained in:
+1
-1
@@ -83,7 +83,7 @@ func (ssh_conf *MakeConfig) connect() (*ssh.Session, error) {
|
||||
Auth: auths,
|
||||
}
|
||||
|
||||
client, err := ssh.Dial("tcp", ssh_conf.Server+":"+ssh_conf.Port, config)
|
||||
client, err := ssh.Dial("tcp", net.JoinHostPort(ssh_conf.Server, ssh_conf.Port), config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user