From e422a4544915b58e0f89e0cd341175809ed48423 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 28 Oct 2014 08:35:21 -0700 Subject: [PATCH] fmt --- builder/amazon/common/state.go | 2 +- builder/googlecompute/step_create_instance.go | 10 +++++----- builder/vmware/common/driver_fusion6.go | 2 +- builder/vmware/iso/driver_esx5.go | 10 +++++----- packer/rpc/client.go | 2 +- packer/rpc/server.go | 2 +- post-processor/vagrant-cloud/post-processor.go | 2 +- post-processor/vagrant-cloud/step_release_version.go | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/builder/amazon/common/state.go b/builder/amazon/common/state.go index aead0161b..62e861d74 100644 --- a/builder/amazon/common/state.go +++ b/builder/amazon/common/state.go @@ -125,7 +125,7 @@ func WaitForState(conf *StateChangeConf) (i interface{}, err error) { log.Printf("Waiting for state to become: %s", conf.Target) sleepSeconds := 2 - maxTicks := int(TimeoutSeconds() / sleepSeconds) + 1 + maxTicks := int(TimeoutSeconds()/sleepSeconds) + 1 notfoundTick := 0 for { diff --git a/builder/googlecompute/step_create_instance.go b/builder/googlecompute/step_create_instance.go index 015bcde6c..11ca84edc 100644 --- a/builder/googlecompute/step_create_instance.go +++ b/builder/googlecompute/step_create_instance.go @@ -58,11 +58,11 @@ func (s *StepCreateInstance) Run(state multistep.StateBag) multistep.StepAction DiskSizeGb: config.DiskSizeGb, Image: config.getImage(), MachineType: config.MachineType, - Metadata: config.getInstanceMetadata(sshPublicKey), - Name: name, - Network: config.Network, - Tags: config.Tags, - Zone: config.Zone, + Metadata: config.getInstanceMetadata(sshPublicKey), + Name: name, + Network: config.Network, + Tags: config.Tags, + Zone: config.Zone, }) if err == nil { diff --git a/builder/vmware/common/driver_fusion6.go b/builder/vmware/common/driver_fusion6.go index ae4d63b9a..af42c7ef9 100644 --- a/builder/vmware/common/driver_fusion6.go +++ b/builder/vmware/common/driver_fusion6.go @@ -26,7 +26,7 @@ func (d *Fusion6Driver) Clone(dst, src string) error { if _, _, err := runAndLog(cmd); err != nil { if strings.Contains(err.Error(), "parameters was invalid") { return fmt.Errorf( - "Clone is not supported with your version of Fusion. Packer " + + "Clone is not supported with your version of Fusion. Packer "+ "only works with Fusion %s Professional or above. Please verify your version.", VMWARE_FUSION_VERSION) } diff --git a/builder/vmware/iso/driver_esx5.go b/builder/vmware/iso/driver_esx5.go index 75ff9883d..e519c21a1 100644 --- a/builder/vmware/iso/driver_esx5.go +++ b/builder/vmware/iso/driver_esx5.go @@ -22,11 +22,11 @@ import ( // ESX5 driver talks to an ESXi5 hypervisor remotely over SSH to build // virtual machines. This driver can only manage one machine at a time. type ESX5Driver struct { - Host string - Port uint - Username string - Password string - Datastore string + Host string + Port uint + Username string + Password string + Datastore string CacheDatastore string CacheDirectory string diff --git a/packer/rpc/client.go b/packer/rpc/client.go index 62a0022b5..fcc15fe56 100644 --- a/packer/rpc/client.go +++ b/packer/rpc/client.go @@ -1,8 +1,8 @@ package rpc import ( - "github.com/mitchellh/packer/packer" "github.com/hashicorp/go-msgpack/codec" + "github.com/mitchellh/packer/packer" "io" "log" "net/rpc" diff --git a/packer/rpc/server.go b/packer/rpc/server.go index de1d0ebb1..764f7c72e 100644 --- a/packer/rpc/server.go +++ b/packer/rpc/server.go @@ -2,8 +2,8 @@ package rpc import ( "fmt" - "github.com/mitchellh/packer/packer" "github.com/hashicorp/go-msgpack/codec" + "github.com/mitchellh/packer/packer" "io" "log" "net/rpc" diff --git a/post-processor/vagrant-cloud/post-processor.go b/post-processor/vagrant-cloud/post-processor.go index f6a5b2dfe..516bea5d9 100644 --- a/post-processor/vagrant-cloud/post-processor.go +++ b/post-processor/vagrant-cloud/post-processor.go @@ -111,7 +111,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac // The name of the provider for vagrant cloud, and vagrant providerName := providerFromBuilderName(artifact.Id()) - boxDownloadUrl, err := p.config.tpl.Process(p.config.BoxDownloadUrl, &boxDownloadUrlTemplate { + boxDownloadUrl, err := p.config.tpl.Process(p.config.BoxDownloadUrl, &boxDownloadUrlTemplate{ ArtifactId: artifact.Id(), Provider: providerName, }) diff --git a/post-processor/vagrant-cloud/step_release_version.go b/post-processor/vagrant-cloud/step_release_version.go index d8809f9ca..dab417d00 100644 --- a/post-processor/vagrant-cloud/step_release_version.go +++ b/post-processor/vagrant-cloud/step_release_version.go @@ -2,9 +2,9 @@ package vagrantcloud import ( "fmt" - "strings" "github.com/mitchellh/multistep" "github.com/mitchellh/packer/packer" + "strings" ) type stepReleaseVersion struct {