From 23a48d6619fd09fd0a8311111f37f0cd3163d560 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 8 Jun 2015 21:34:20 -0700 Subject: [PATCH] go fmt --- builder/digitalocean/ssh.go | 2 +- builder/googlecompute/ssh.go | 2 +- builder/null/ssh.go | 2 +- builder/openstack/ssh.go | 2 +- builder/parallels/common/ssh.go | 2 +- builder/qemu/ssh.go | 2 +- builder/virtualbox/common/ssh.go | 2 +- builder/vmware/common/ssh.go | 2 +- builder/vmware/iso/step_upload_vmx.go | 9 ++++----- common/step_connect_ssh.go | 2 +- communicator/ssh/communicator.go | 2 +- communicator/ssh/communicator_test.go | 2 +- post-processor/atlas/util_test.go | 2 +- 13 files changed, 16 insertions(+), 17 deletions(-) diff --git a/builder/digitalocean/ssh.go b/builder/digitalocean/ssh.go index bd0afc3fe..12046b04b 100644 --- a/builder/digitalocean/ssh.go +++ b/builder/digitalocean/ssh.go @@ -1,9 +1,9 @@ package digitalocean import ( - "golang.org/x/crypto/ssh" "fmt" "github.com/mitchellh/multistep" + "golang.org/x/crypto/ssh" ) func sshAddress(state multistep.StateBag) (string, error) { diff --git a/builder/googlecompute/ssh.go b/builder/googlecompute/ssh.go index a4e0151f4..e04029e44 100644 --- a/builder/googlecompute/ssh.go +++ b/builder/googlecompute/ssh.go @@ -1,9 +1,9 @@ package googlecompute import ( - "golang.org/x/crypto/ssh" "fmt" "github.com/mitchellh/multistep" + "golang.org/x/crypto/ssh" ) // sshAddress returns the ssh address. diff --git a/builder/null/ssh.go b/builder/null/ssh.go index a9c2af330..e6ac9ab16 100644 --- a/builder/null/ssh.go +++ b/builder/null/ssh.go @@ -1,10 +1,10 @@ package null import ( - gossh "golang.org/x/crypto/ssh" "fmt" "github.com/mitchellh/multistep" "github.com/mitchellh/packer/communicator/ssh" + gossh "golang.org/x/crypto/ssh" "io/ioutil" ) diff --git a/builder/openstack/ssh.go b/builder/openstack/ssh.go index 16afda64d..d20f24170 100644 --- a/builder/openstack/ssh.go +++ b/builder/openstack/ssh.go @@ -1,10 +1,10 @@ package openstack import ( - "golang.org/x/crypto/ssh" "errors" "fmt" "github.com/mitchellh/multistep" + "golang.org/x/crypto/ssh" "time" "github.com/mitchellh/gophercloud-fork-40444fb" diff --git a/builder/parallels/common/ssh.go b/builder/parallels/common/ssh.go index 142b6c99d..becf68e42 100644 --- a/builder/parallels/common/ssh.go +++ b/builder/parallels/common/ssh.go @@ -3,10 +3,10 @@ package common import ( "fmt" - "golang.org/x/crypto/ssh" "github.com/mitchellh/multistep" commonssh "github.com/mitchellh/packer/common/ssh" packerssh "github.com/mitchellh/packer/communicator/ssh" + "golang.org/x/crypto/ssh" ) func SSHAddress(state multistep.StateBag) (string, error) { diff --git a/builder/qemu/ssh.go b/builder/qemu/ssh.go index deb7ba405..9724d7483 100644 --- a/builder/qemu/ssh.go +++ b/builder/qemu/ssh.go @@ -3,10 +3,10 @@ package qemu import ( "fmt" - gossh "golang.org/x/crypto/ssh" "github.com/mitchellh/multistep" commonssh "github.com/mitchellh/packer/common/ssh" "github.com/mitchellh/packer/communicator/ssh" + gossh "golang.org/x/crypto/ssh" ) func sshAddress(state multistep.StateBag) (string, error) { diff --git a/builder/virtualbox/common/ssh.go b/builder/virtualbox/common/ssh.go index c07c2ce9c..9ca2529b8 100644 --- a/builder/virtualbox/common/ssh.go +++ b/builder/virtualbox/common/ssh.go @@ -3,10 +3,10 @@ package common import ( "fmt" - gossh "golang.org/x/crypto/ssh" "github.com/mitchellh/multistep" commonssh "github.com/mitchellh/packer/common/ssh" "github.com/mitchellh/packer/communicator/ssh" + gossh "golang.org/x/crypto/ssh" ) func SSHAddress(state multistep.StateBag) (string, error) { diff --git a/builder/vmware/common/ssh.go b/builder/vmware/common/ssh.go index bfd0b8bc7..167bd6792 100644 --- a/builder/vmware/common/ssh.go +++ b/builder/vmware/common/ssh.go @@ -7,10 +7,10 @@ import ( "log" "os" - gossh "golang.org/x/crypto/ssh" "github.com/mitchellh/multistep" commonssh "github.com/mitchellh/packer/common/ssh" "github.com/mitchellh/packer/communicator/ssh" + gossh "golang.org/x/crypto/ssh" ) func SSHAddressFunc(config *SSHConfig) func(multistep.StateBag) (string, error) { diff --git a/builder/vmware/iso/step_upload_vmx.go b/builder/vmware/iso/step_upload_vmx.go index 39e14af16..96dde2cfc 100644 --- a/builder/vmware/iso/step_upload_vmx.go +++ b/builder/vmware/iso/step_upload_vmx.go @@ -3,12 +3,11 @@ package iso import ( "fmt" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" vmwcommon "github.com/mitchellh/packer/builder/vmware/common" + "github.com/mitchellh/packer/packer" "path/filepath" ) - // This step upload the VMX to the remote host // // Uses: @@ -18,8 +17,8 @@ import ( // // Produces: // -type StepUploadVMX struct{ - RemoteType string +type StepUploadVMX struct { + RemoteType string } func (c *StepUploadVMX) Run(state multistep.StateBag) multistep.StepAction { @@ -31,7 +30,7 @@ func (c *StepUploadVMX) Run(state multistep.StateBag) multistep.StepAction { if c.RemoteType == "esx5" { remoteDriver, ok := driver.(RemoteDriver) if ok { - remoteVmxPath := filepath.ToSlash(filepath.Join(fmt.Sprintf("%s",remoteDriver), filepath.Base(vmxPath))) + remoteVmxPath := filepath.ToSlash(filepath.Join(fmt.Sprintf("%s", remoteDriver), filepath.Base(vmxPath))) if err := remoteDriver.upload(remoteVmxPath, vmxPath); err != nil { state.Put("error", fmt.Errorf("Error writing VMX: %s", err)) return multistep.ActionHalt diff --git a/common/step_connect_ssh.go b/common/step_connect_ssh.go index 30064c7f2..c3d8aac2d 100644 --- a/common/step_connect_ssh.go +++ b/common/step_connect_ssh.go @@ -1,12 +1,12 @@ package common import ( - gossh "golang.org/x/crypto/ssh" "errors" "fmt" "github.com/mitchellh/multistep" "github.com/mitchellh/packer/communicator/ssh" "github.com/mitchellh/packer/packer" + gossh "golang.org/x/crypto/ssh" "log" "strings" "time" diff --git a/communicator/ssh/communicator.go b/communicator/ssh/communicator.go index 611622750..3f0e6191b 100644 --- a/communicator/ssh/communicator.go +++ b/communicator/ssh/communicator.go @@ -3,10 +3,10 @@ package ssh import ( "bufio" "bytes" - "golang.org/x/crypto/ssh" "errors" "fmt" "github.com/mitchellh/packer/packer" + "golang.org/x/crypto/ssh" "io" "io/ioutil" "log" diff --git a/communicator/ssh/communicator_test.go b/communicator/ssh/communicator_test.go index 26cf76757..e9f73d2dc 100644 --- a/communicator/ssh/communicator_test.go +++ b/communicator/ssh/communicator_test.go @@ -4,9 +4,9 @@ package ssh import ( "bytes" - "golang.org/x/crypto/ssh" "fmt" "github.com/mitchellh/packer/packer" + "golang.org/x/crypto/ssh" "net" "testing" ) diff --git a/post-processor/atlas/util_test.go b/post-processor/atlas/util_test.go index 9f2535ccb..b6b9da3d9 100644 --- a/post-processor/atlas/util_test.go +++ b/post-processor/atlas/util_test.go @@ -6,7 +6,7 @@ import ( func TestLongestCommonPrefix(t *testing.T) { cases := []struct { - Input []string + Input []string Output string }{ {