refactored sshconnection initialization
it was needed, okay?
This commit is contained in:
parent
659c9de867
commit
1755cb0f8c
11
ssh.go
11
ssh.go
@ -31,11 +31,12 @@ type SSHPush []*ssh.Client
|
|||||||
type SSHSuccess []error
|
type SSHSuccess []error
|
||||||
|
|
||||||
func initializeConnection(config Configuration) (SSHConnection, *ssh.ClientConfig) {
|
func initializeConnection(config Configuration) (SSHConnection, *ssh.ClientConfig) {
|
||||||
var sshConn SSHConnection
|
sshConn := SSHConnection{
|
||||||
sshConn.Username = config.Username
|
Username: config.Username,
|
||||||
sshConn.Password = config.Password
|
Password: config.Password,
|
||||||
sshConn.Port = config.Port
|
Port: config.Port,
|
||||||
sshConn.Hosts = config.Hosts
|
Hosts: config.Hosts,
|
||||||
|
}
|
||||||
|
|
||||||
sshConfig := &ssh.ClientConfig{
|
sshConfig := &ssh.ClientConfig{
|
||||||
User: sshConn.Username,
|
User: sshConn.Username,
|
||||||
|
Loading…
Reference in New Issue
Block a user