From 1755cb0f8c39db14cb8f95b68d13a8cdaa3ed1a5 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Fri, 16 Aug 2019 22:00:36 -0400 Subject: [PATCH] refactored sshconnection initialization it was needed, okay? --- ssh.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ssh.go b/ssh.go index fca447f..e00d865 100644 --- a/ssh.go +++ b/ssh.go @@ -31,11 +31,12 @@ type SSHPush []*ssh.Client type SSHSuccess []error func initializeConnection(config Configuration) (SSHConnection, *ssh.ClientConfig) { - var sshConn SSHConnection - sshConn.Username = config.Username - sshConn.Password = config.Password - sshConn.Port = config.Port - sshConn.Hosts = config.Hosts + sshConn := SSHConnection{ + Username: config.Username, + Password: config.Password, + Port: config.Port, + Hosts: config.Hosts, + } sshConfig := &ssh.ClientConfig{ User: sshConn.Username,