From 06144cf28728040ef60e62ceb6bf8a9105263d70 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 28 Oct 2014 08:43:19 -0700 Subject: [PATCH] fmt --- builder/qemu/artifact.go | 4 ++-- builder/qemu/builder.go | 4 ++-- builder/qemu/step_copy_disk.go | 6 +++--- builder/qemu/step_create_disk.go | 6 +++--- builder/qemu/step_resize_disk.go | 6 +++--- post-processor/vagrant/libvirt.go | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/builder/qemu/artifact.go b/builder/qemu/artifact.go index ac841df08..fe7674a47 100644 --- a/builder/qemu/artifact.go +++ b/builder/qemu/artifact.go @@ -8,8 +8,8 @@ import ( // Artifact is the result of running the Qemu builder, namely a set // of files associated with the resulting machine. type Artifact struct { - dir string - f []string + dir string + f []string state map[string]interface{} } diff --git a/builder/qemu/builder.go b/builder/qemu/builder.go index 63ef873c0..1c3d2cdca 100644 --- a/builder/qemu/builder.go +++ b/builder/qemu/builder.go @@ -500,8 +500,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe } artifact := &Artifact{ - dir: b.config.OutputDir, - f: files, + dir: b.config.OutputDir, + f: files, state: make(map[string]interface{}), } diff --git a/builder/qemu/step_copy_disk.go b/builder/qemu/step_copy_disk.go index c3645926b..7f2efe30e 100644 --- a/builder/qemu/step_copy_disk.go +++ b/builder/qemu/step_copy_disk.go @@ -27,9 +27,9 @@ func (s *stepCopyDisk) Run(state multistep.StateBag) multistep.StepAction { path, } - if config.DiskImage == false { - return multistep.ActionContinue - } + if config.DiskImage == false { + return multistep.ActionContinue + } ui.Say("Copying hard drive...") if err := driver.QemuImg(command...); err != nil { diff --git a/builder/qemu/step_create_disk.go b/builder/qemu/step_create_disk.go index 0f51110d0..986df1d2b 100644 --- a/builder/qemu/step_create_disk.go +++ b/builder/qemu/step_create_disk.go @@ -26,9 +26,9 @@ func (s *stepCreateDisk) Run(state multistep.StateBag) multistep.StepAction { fmt.Sprintf("%vM", config.DiskSize), } - if config.DiskImage == true { - return multistep.ActionContinue - } + if config.DiskImage == true { + return multistep.ActionContinue + } ui.Say("Creating hard drive...") if err := driver.QemuImg(command...); err != nil { diff --git a/builder/qemu/step_resize_disk.go b/builder/qemu/step_resize_disk.go index d81a4f127..4e8536c32 100644 --- a/builder/qemu/step_resize_disk.go +++ b/builder/qemu/step_resize_disk.go @@ -25,9 +25,9 @@ func (s *stepResizeDisk) Run(state multistep.StateBag) multistep.StepAction { fmt.Sprintf("%vM", config.DiskSize), } - if config.DiskImage == false { - return multistep.ActionContinue - } + if config.DiskImage == false { + return multistep.ActionContinue + } ui.Say("Resizing hard drive...") if err := driver.QemuImg(command...); err != nil { diff --git a/post-processor/vagrant/libvirt.go b/post-processor/vagrant/libvirt.go index 6ab0b3900..39a4f18b0 100644 --- a/post-processor/vagrant/libvirt.go +++ b/post-processor/vagrant/libvirt.go @@ -29,7 +29,7 @@ func (p *LibVirtProvider) Process(ui packer.Ui, artifact packer.Artifact, dir st format := artifact.State("diskType").(string) origSize := artifact.State("diskSize").(uint64) size := origSize / 1024 // In MB, want GB - if origSize % 1024 > 0 { + if origSize%1024 > 0 { // Make sure we don't make the size smaller size++ }