diff --git a/builder/amazonebs/step_connect_ssh.go b/builder/amazonebs/step_connect_ssh.go index e342cee02..e297ca076 100644 --- a/builder/amazonebs/step_connect_ssh.go +++ b/builder/amazonebs/step_connect_ssh.go @@ -74,7 +74,7 @@ func (s *stepConnectSSH) Run(state map[string]interface{}) multistep.StepAction log.Printf("Waiting up to %s for SSH connection", config.SSHTimeout) timeout := time.After(config.SSHTimeout) - ConnectWaitLoop: +ConnectWaitLoop: for { select { case <-connected: diff --git a/packer/plugin/client.go b/packer/plugin/client.go index c81159a84..d6ee966db 100644 --- a/packer/plugin/client.go +++ b/packer/plugin/client.go @@ -24,7 +24,7 @@ var managedClients = make([]*Client, 0, 5) // RPC address, and returning various types of packer interface implementations // across the multi-process communication layer. type Client struct { - config *ClientConfig + config *ClientConfig exited bool doneLogging bool l sync.Mutex diff --git a/packer/plugin/client_test.go b/packer/plugin/client_test.go index 5b757c206..305308735 100644 --- a/packer/plugin/client_test.go +++ b/packer/plugin/client_test.go @@ -35,7 +35,7 @@ func TestClient(t *testing.T) { func TestClient_Start_Timeout(t *testing.T) { config := &ClientConfig{ - Cmd: helperProcess("start-timeout"), + Cmd: helperProcess("start-timeout"), StartTimeout: 50 * time.Millisecond, } diff --git a/provisioner/shell/provisioner.go b/provisioner/shell/provisioner.go index 2a309f0fe..225a22739 100644 --- a/provisioner/shell/provisioner.go +++ b/provisioner/shell/provisioner.go @@ -5,8 +5,8 @@ package shell import ( "bufio" "bytes" - "fmt" "errors" + "fmt" "github.com/mitchellh/iochan" "github.com/mitchellh/mapstructure" "github.com/mitchellh/packer/packer" @@ -104,7 +104,7 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) { // Write our contents to it writer := bufio.NewWriter(tf) for _, command := range p.config.Inline { - if _, err := writer.WriteString(command+"\n"); err != nil { + if _, err := writer.WriteString(command + "\n"); err != nil { ui.Error(fmt.Sprintf("Error preparing shell script: %s", err)) return }