From c6299972b9d21af337f615358d5327e5754c14e7 Mon Sep 17 00:00:00 2001 From: Matthew Hooker Date: Wed, 18 Apr 2018 14:53:59 -0700 Subject: [PATCH] s/boot_command/bootcommand/ --- Makefile | 4 ++-- builder/hyperv/common/step_type_boot_command.go | 2 +- builder/parallels/common/step_type_boot_command.go | 2 +- builder/parallels/iso/builder.go | 2 +- builder/parallels/pvm/config.go | 2 +- builder/qemu/step_type_boot_command.go | 2 +- builder/virtualbox/common/step_type_boot_command.go | 2 +- builder/vmware/common/step_type_boot_command.go | 2 +- builder/vmware/iso/builder.go | 2 +- builder/vmware/iso/step_create_vmx_test.go | 3 ++- builder/vmware/vmx/config.go | 2 +- common/{boot_command => bootcommand}/boot_command.go | 0 common/{boot_command => bootcommand}/boot_command.pigeon | 0 common/{boot_command => bootcommand}/boot_command_ast.go | 0 common/{boot_command => bootcommand}/boot_command_ast_test.go | 0 common/{boot_command => bootcommand}/config.go | 0 common/{boot_command => bootcommand}/config_test.go | 0 common/{boot_command => bootcommand}/driver.go | 0 common/{boot_command => bootcommand}/gen.go | 0 common/{boot_command => bootcommand}/pc_xt_driver.go | 0 common/{boot_command => bootcommand}/pc_xt_driver_test.go | 0 common/{boot_command => bootcommand}/vnc_driver.go | 0 common/{boot_command => bootcommand}/vnc_driver_test.go | 0 fix/fixer_powershell_escapes.go | 3 ++- main.go | 2 +- post-processor/vagrant/google_test.go | 3 ++- post-processor/vagrant/scaleway.go | 3 ++- post-processor/vsphere/artifact_test.go | 3 ++- 28 files changed, 22 insertions(+), 17 deletions(-) rename common/{boot_command => bootcommand}/boot_command.go (100%) rename common/{boot_command => bootcommand}/boot_command.pigeon (100%) rename common/{boot_command => bootcommand}/boot_command_ast.go (100%) rename common/{boot_command => bootcommand}/boot_command_ast_test.go (100%) rename common/{boot_command => bootcommand}/config.go (100%) rename common/{boot_command => bootcommand}/config_test.go (100%) rename common/{boot_command => bootcommand}/driver.go (100%) rename common/{boot_command => bootcommand}/gen.go (100%) rename common/{boot_command => bootcommand}/pc_xt_driver.go (100%) rename common/{boot_command => bootcommand}/pc_xt_driver_test.go (100%) rename common/{boot_command => bootcommand}/vnc_driver.go (100%) rename common/{boot_command => bootcommand}/vnc_driver_test.go (100%) diff --git a/Makefile b/Makefile index be74e8be1..0ccd547b4 100644 --- a/Makefile +++ b/Makefile @@ -74,8 +74,8 @@ fmt-examples: # source files. generate: deps ## Generate dynamically generated code go generate . - gofmt -w common/boot_command/boot_command.go - goimports -w common/boot_command/boot_command.go + gofmt -w common/bootcommand/boot_command.go + goimports -w common/bootcommand/boot_command.go gofmt -w command/plugin.go test: deps fmt-check ## Run unit tests diff --git a/builder/hyperv/common/step_type_boot_command.go b/builder/hyperv/common/step_type_boot_command.go index 9b8b08654..5f449e4e6 100644 --- a/builder/hyperv/common/step_type_boot_command.go +++ b/builder/hyperv/common/step_type_boot_command.go @@ -7,7 +7,7 @@ import ( "time" "github.com/hashicorp/packer/common" - "github.com/hashicorp/packer/common/boot_command" + "github.com/hashicorp/packer/common/bootcommand" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" "github.com/hashicorp/packer/template/interpolate" diff --git a/builder/parallels/common/step_type_boot_command.go b/builder/parallels/common/step_type_boot_command.go index cedc10b8a..794bd6549 100644 --- a/builder/parallels/common/step_type_boot_command.go +++ b/builder/parallels/common/step_type_boot_command.go @@ -7,7 +7,7 @@ import ( "time" packer_common "github.com/hashicorp/packer/common" - "github.com/hashicorp/packer/common/boot_command" + "github.com/hashicorp/packer/common/bootcommand" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" "github.com/hashicorp/packer/template/interpolate" diff --git a/builder/parallels/iso/builder.go b/builder/parallels/iso/builder.go index 85d1199e6..9ba2002f7 100644 --- a/builder/parallels/iso/builder.go +++ b/builder/parallels/iso/builder.go @@ -7,7 +7,7 @@ import ( parallelscommon "github.com/hashicorp/packer/builder/parallels/common" "github.com/hashicorp/packer/common" - "github.com/hashicorp/packer/common/boot_command" + "github.com/hashicorp/packer/common/bootcommand" "github.com/hashicorp/packer/helper/communicator" "github.com/hashicorp/packer/helper/config" "github.com/hashicorp/packer/helper/multistep" diff --git a/builder/parallels/pvm/config.go b/builder/parallels/pvm/config.go index 8d34f24b5..edccea50e 100644 --- a/builder/parallels/pvm/config.go +++ b/builder/parallels/pvm/config.go @@ -6,7 +6,7 @@ import ( parallelscommon "github.com/hashicorp/packer/builder/parallels/common" "github.com/hashicorp/packer/common" - "github.com/hashicorp/packer/common/boot_command" + "github.com/hashicorp/packer/common/bootcommand" "github.com/hashicorp/packer/helper/config" "github.com/hashicorp/packer/packer" "github.com/hashicorp/packer/template/interpolate" diff --git a/builder/qemu/step_type_boot_command.go b/builder/qemu/step_type_boot_command.go index a0cbb7a90..a552e2805 100644 --- a/builder/qemu/step_type_boot_command.go +++ b/builder/qemu/step_type_boot_command.go @@ -8,7 +8,7 @@ import ( "time" "github.com/hashicorp/packer/common" - "github.com/hashicorp/packer/common/boot_command" + "github.com/hashicorp/packer/common/bootcommand" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" "github.com/hashicorp/packer/template/interpolate" diff --git a/builder/virtualbox/common/step_type_boot_command.go b/builder/virtualbox/common/step_type_boot_command.go index cb0df4e40..2ae5957af 100644 --- a/builder/virtualbox/common/step_type_boot_command.go +++ b/builder/virtualbox/common/step_type_boot_command.go @@ -6,7 +6,7 @@ import ( "time" "github.com/hashicorp/packer/common" - "github.com/hashicorp/packer/common/boot_command" + "github.com/hashicorp/packer/common/bootcommand" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" "github.com/hashicorp/packer/template/interpolate" diff --git a/builder/vmware/common/step_type_boot_command.go b/builder/vmware/common/step_type_boot_command.go index 7544c4c3e..83d55ce11 100644 --- a/builder/vmware/common/step_type_boot_command.go +++ b/builder/vmware/common/step_type_boot_command.go @@ -8,7 +8,7 @@ import ( "time" "github.com/hashicorp/packer/common" - "github.com/hashicorp/packer/common/boot_command" + "github.com/hashicorp/packer/common/bootcommand" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" "github.com/hashicorp/packer/template/interpolate" diff --git a/builder/vmware/iso/builder.go b/builder/vmware/iso/builder.go index 1edd778ee..60c0fc462 100644 --- a/builder/vmware/iso/builder.go +++ b/builder/vmware/iso/builder.go @@ -11,7 +11,7 @@ import ( vmwcommon "github.com/hashicorp/packer/builder/vmware/common" "github.com/hashicorp/packer/common" - "github.com/hashicorp/packer/common/boot_command" + "github.com/hashicorp/packer/common/bootcommand" "github.com/hashicorp/packer/helper/communicator" "github.com/hashicorp/packer/helper/config" "github.com/hashicorp/packer/helper/multistep" diff --git a/builder/vmware/iso/step_create_vmx_test.go b/builder/vmware/iso/step_create_vmx_test.go index 7553dff82..26605a1f5 100644 --- a/builder/vmware/iso/step_create_vmx_test.go +++ b/builder/vmware/iso/step_create_vmx_test.go @@ -12,10 +12,11 @@ import ( "strconv" "strings" + "testing" + "github.com/hashicorp/packer/packer" "github.com/hashicorp/packer/provisioner/shell" "github.com/hashicorp/packer/template" - "testing" ) var vmxTestBuilderConfig = map[string]string{ diff --git a/builder/vmware/vmx/config.go b/builder/vmware/vmx/config.go index e937136a4..0fb9993aa 100644 --- a/builder/vmware/vmx/config.go +++ b/builder/vmware/vmx/config.go @@ -6,7 +6,7 @@ import ( vmwcommon "github.com/hashicorp/packer/builder/vmware/common" "github.com/hashicorp/packer/common" - "github.com/hashicorp/packer/common/boot_command" + "github.com/hashicorp/packer/common/bootcommand" "github.com/hashicorp/packer/helper/config" "github.com/hashicorp/packer/packer" "github.com/hashicorp/packer/template/interpolate" diff --git a/common/boot_command/boot_command.go b/common/bootcommand/boot_command.go similarity index 100% rename from common/boot_command/boot_command.go rename to common/bootcommand/boot_command.go diff --git a/common/boot_command/boot_command.pigeon b/common/bootcommand/boot_command.pigeon similarity index 100% rename from common/boot_command/boot_command.pigeon rename to common/bootcommand/boot_command.pigeon diff --git a/common/boot_command/boot_command_ast.go b/common/bootcommand/boot_command_ast.go similarity index 100% rename from common/boot_command/boot_command_ast.go rename to common/bootcommand/boot_command_ast.go diff --git a/common/boot_command/boot_command_ast_test.go b/common/bootcommand/boot_command_ast_test.go similarity index 100% rename from common/boot_command/boot_command_ast_test.go rename to common/bootcommand/boot_command_ast_test.go diff --git a/common/boot_command/config.go b/common/bootcommand/config.go similarity index 100% rename from common/boot_command/config.go rename to common/bootcommand/config.go diff --git a/common/boot_command/config_test.go b/common/bootcommand/config_test.go similarity index 100% rename from common/boot_command/config_test.go rename to common/bootcommand/config_test.go diff --git a/common/boot_command/driver.go b/common/bootcommand/driver.go similarity index 100% rename from common/boot_command/driver.go rename to common/bootcommand/driver.go diff --git a/common/boot_command/gen.go b/common/bootcommand/gen.go similarity index 100% rename from common/boot_command/gen.go rename to common/bootcommand/gen.go diff --git a/common/boot_command/pc_xt_driver.go b/common/bootcommand/pc_xt_driver.go similarity index 100% rename from common/boot_command/pc_xt_driver.go rename to common/bootcommand/pc_xt_driver.go diff --git a/common/boot_command/pc_xt_driver_test.go b/common/bootcommand/pc_xt_driver_test.go similarity index 100% rename from common/boot_command/pc_xt_driver_test.go rename to common/bootcommand/pc_xt_driver_test.go diff --git a/common/boot_command/vnc_driver.go b/common/bootcommand/vnc_driver.go similarity index 100% rename from common/boot_command/vnc_driver.go rename to common/bootcommand/vnc_driver.go diff --git a/common/boot_command/vnc_driver_test.go b/common/bootcommand/vnc_driver_test.go similarity index 100% rename from common/boot_command/vnc_driver_test.go rename to common/bootcommand/vnc_driver_test.go diff --git a/fix/fixer_powershell_escapes.go b/fix/fixer_powershell_escapes.go index 9da9ae91f..e9e3b0033 100644 --- a/fix/fixer_powershell_escapes.go +++ b/fix/fixer_powershell_escapes.go @@ -1,8 +1,9 @@ package fix import ( - "github.com/mitchellh/mapstructure" "strings" + + "github.com/mitchellh/mapstructure" ) // FixerPowerShellEscapes removes the PowerShell escape character from user diff --git a/main.go b/main.go index daa8ce590..ff53d1744 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ // This is the main package for the `packer` application. //go:generate go run ./scripts/generate-plugins.go -//go:generate go generate ./common/boot_command/... +//go:generate go generate ./common/bootcommand/... package main import ( diff --git a/post-processor/vagrant/google_test.go b/post-processor/vagrant/google_test.go index a66be8539..22eab0c77 100644 --- a/post-processor/vagrant/google_test.go +++ b/post-processor/vagrant/google_test.go @@ -1,9 +1,10 @@ package vagrant import ( - "github.com/hashicorp/packer/packer" "strings" "testing" + + "github.com/hashicorp/packer/packer" ) func TestGoogleProvider_impl(t *testing.T) { diff --git a/post-processor/vagrant/scaleway.go b/post-processor/vagrant/scaleway.go index 879f2b59e..ee275cffd 100644 --- a/post-processor/vagrant/scaleway.go +++ b/post-processor/vagrant/scaleway.go @@ -3,9 +3,10 @@ package vagrant import ( "bytes" "fmt" - "github.com/hashicorp/packer/packer" "strings" "text/template" + + "github.com/hashicorp/packer/packer" ) type scalewayVagrantfileTemplate struct { diff --git a/post-processor/vsphere/artifact_test.go b/post-processor/vsphere/artifact_test.go index b4f17c759..f6d0d54be 100644 --- a/post-processor/vsphere/artifact_test.go +++ b/post-processor/vsphere/artifact_test.go @@ -1,8 +1,9 @@ package vsphere import ( - "github.com/hashicorp/packer/packer" "testing" + + "github.com/hashicorp/packer/packer" ) func TestArtifact_ImplementsArtifact(t *testing.T) {