From 7a189a83a19c1acabbcdb505120653e0aa77ea46 Mon Sep 17 00:00:00 2001 From: Matthew Hooker Date: Mon, 22 Jan 2018 15:32:33 -0800 Subject: [PATCH] fix imports `find . -type f -name '*.go' -not -path "./vendor/*" -exec goimports -w {} \;` --- builder/alicloud/ecs/step_attach_keypair.go | 2 +- builder/alicloud/ecs/step_check_source_image.go | 1 + builder/alicloud/ecs/step_config_eip.go | 1 + builder/alicloud/ecs/step_config_key_pair.go | 1 + builder/alicloud/ecs/step_config_public_ip.go | 1 + builder/alicloud/ecs/step_config_security_group.go | 1 + builder/alicloud/ecs/step_config_vpc.go | 1 + builder/alicloud/ecs/step_config_vswitch.go | 1 + builder/alicloud/ecs/step_create_image.go | 1 + builder/alicloud/ecs/step_create_instance.go | 1 + builder/alicloud/ecs/step_delete_images_snapshots.go | 1 + builder/alicloud/ecs/step_mount_disk.go | 1 + builder/alicloud/ecs/step_pre_validate.go | 1 + builder/alicloud/ecs/step_region_copy_image.go | 1 + builder/alicloud/ecs/step_run_instance.go | 1 + builder/alicloud/ecs/step_share_image.go | 1 + builder/alicloud/ecs/step_stop_instance.go | 1 + builder/amazon/chroot/step_attach_volume.go | 1 + builder/amazon/chroot/step_check_root_device.go | 1 + builder/amazon/chroot/step_chroot_provision.go | 1 + builder/amazon/chroot/step_copy_files.go | 5 ++--- builder/amazon/chroot/step_create_volume.go | 1 + builder/amazon/chroot/step_early_cleanup.go | 4 +++- builder/amazon/chroot/step_early_unflock.go | 4 +++- builder/amazon/chroot/step_flock.go | 5 ++--- builder/amazon/chroot/step_instance_info.go | 1 + builder/amazon/chroot/step_mount_device.go | 1 + builder/amazon/chroot/step_mount_extra.go | 5 ++--- builder/amazon/chroot/step_post_mount_commands.go | 2 ++ builder/amazon/chroot/step_pre_mount_commands.go | 2 ++ builder/amazon/chroot/step_prepare_device.go | 1 + builder/amazon/chroot/step_register_ami.go | 1 + builder/amazon/chroot/step_snapshot.go | 1 + builder/amazon/common/step_ami_region_copy.go | 1 + builder/amazon/common/step_create_tags.go | 1 + builder/amazon/common/step_deregister_ami.go | 1 + builder/amazon/common/step_encrypted_ami.go | 1 + builder/amazon/common/step_get_password.go | 1 + builder/amazon/common/step_key_pair.go | 1 + builder/amazon/common/step_modify_ami_attributes.go | 1 + builder/amazon/common/step_modify_ebs_instance.go | 1 + builder/amazon/common/step_pre_validate.go | 1 + builder/amazon/common/step_run_spot_instance.go | 1 + builder/amazon/common/step_security_group.go | 1 + builder/amazon/common/step_source_ami_info.go | 1 + builder/amazon/common/step_stop_ebs_instance.go | 1 + builder/amazon/ebs/step_cleanup_volumes.go | 1 + builder/amazon/ebs/step_create_ami.go | 1 + builder/amazon/ebssurrogate/step_register_ami.go | 1 + builder/amazon/ebssurrogate/step_snapshot_new_root.go | 1 + builder/amazon/ebsvolume/step_tag_ebs_volumes.go | 1 + builder/amazon/instance/step_bundle_volume.go | 1 + builder/amazon/instance/step_register_ami.go | 1 + builder/amazon/instance/step_upload_bundle.go | 1 + builder/amazon/instance/step_upload_x509_cert.go | 4 +++- builder/azure/arm/step_capture_image.go | 1 + builder/azure/arm/step_create_resource_group.go | 1 + builder/azure/arm/step_delete_os_disk.go | 1 + builder/azure/arm/step_delete_resource_group.go | 1 + builder/azure/arm/step_deploy_template.go | 1 + builder/azure/arm/step_get_certificate.go | 1 + builder/azure/arm/step_get_ip_address.go | 1 + builder/azure/arm/step_get_os_disk.go | 1 + builder/azure/arm/step_power_off_compute.go | 1 + builder/azure/arm/step_set_certificate.go | 2 ++ builder/azure/arm/step_test.go | 1 - builder/azure/arm/step_validate_template.go | 1 + builder/azure/common/lin/step_create_cert.go | 1 + builder/azure/common/lin/step_generalize_os.go | 4 +++- builder/cloudstack/step_configure_networking.go | 1 + builder/cloudstack/step_create_instance.go | 1 + builder/cloudstack/step_create_security_group.go | 1 + builder/cloudstack/step_create_template.go | 1 + builder/cloudstack/step_keypair.go | 1 + builder/cloudstack/step_prepare_config.go | 1 + builder/cloudstack/step_shutdown_instance.go | 1 + builder/docker/step_commit.go | 2 ++ builder/docker/step_commit_test.go | 3 +-- builder/docker/step_connect_docker.go | 4 ++-- builder/docker/step_export.go | 1 + builder/docker/step_export_test.go | 3 +-- builder/docker/step_pull.go | 1 + builder/docker/step_pull_test.go | 3 +-- builder/docker/step_run.go | 2 ++ builder/docker/step_run_test.go | 4 ++-- builder/docker/step_temp_dir.go | 5 ++--- builder/docker/step_test.go | 3 ++- builder/googlecompute/step_check_existing_image.go | 1 + builder/googlecompute/step_check_existing_image_test.go | 3 +-- builder/googlecompute/step_create_image.go | 1 + builder/googlecompute/step_create_instance.go | 1 + builder/googlecompute/step_create_ssh_key.go | 1 + builder/googlecompute/step_create_windows_password.go | 1 + builder/googlecompute/step_instance_info.go | 1 + builder/googlecompute/step_instance_info_test.go | 3 +-- builder/googlecompute/step_teardown_instance.go | 1 + builder/googlecompute/step_teardown_instance_test.go | 3 +-- builder/googlecompute/step_wait_startup_script.go | 1 + builder/googlecompute/step_wait_startup_script_test.go | 2 ++ builder/hyperv/common/step_clone_vm.go | 1 + builder/hyperv/common/step_configure_ip.go | 1 + builder/hyperv/common/step_configure_vlan.go | 1 + builder/hyperv/common/step_create_external_switch.go | 1 + builder/hyperv/common/step_create_switch.go | 2 ++ builder/hyperv/common/step_create_tempdir.go | 1 + builder/hyperv/common/step_create_vm.go | 1 + builder/hyperv/common/step_disable_vlan.go | 2 ++ builder/hyperv/common/step_enable_integration_service.go | 2 ++ builder/hyperv/common/step_export_vm.go | 1 + builder/hyperv/common/step_mount_dvddrive.go | 5 ++--- builder/hyperv/common/step_mount_floppydrive.go | 5 ++--- builder/hyperv/common/step_mount_guest_additions.go | 4 +++- builder/hyperv/common/step_mount_secondary_dvd_images.go | 4 +++- builder/hyperv/common/step_output_dir.go | 1 + builder/hyperv/common/step_polling_installation.go | 1 + builder/hyperv/common/step_reboot_vm.go | 4 +++- builder/hyperv/common/step_run.go | 4 +++- builder/hyperv/common/step_shutdown.go | 1 + builder/hyperv/common/step_sleep.go | 4 +++- builder/hyperv/common/step_type_boot_command.go | 1 + builder/hyperv/common/step_unmount_dvddrive.go | 2 ++ builder/hyperv/common/step_unmount_floppydrive.go | 2 ++ builder/hyperv/common/step_unmount_guest_additions.go | 2 ++ builder/hyperv/common/step_unmount_secondary_dvd_images.go | 2 ++ builder/hyperv/common/step_wait_for_install_to_complete.go | 4 +++- builder/hyperv/iso/builder_test.go | 1 - builder/hyperv/vmcx/builder_test.go | 2 -- builder/lxc/builder.go | 3 --- builder/lxc/step_export.go | 5 ++--- builder/lxc/step_lxc_create.go | 5 ++--- builder/lxc/step_prepare_output_dir.go | 5 ++--- builder/lxc/step_provision.go | 4 +++- builder/lxc/step_wait_init.go | 5 ++--- builder/lxd/builder.go | 1 - builder/lxd/step_lxd_launch.go | 4 +++- builder/lxd/step_provision.go | 4 +++- builder/lxd/step_publish.go | 4 +++- builder/oneandone/builder.go | 1 - builder/oneandone/step_create_server.go | 3 +-- builder/oneandone/step_create_sshkey.go | 3 +++ builder/oneandone/step_take_snapshot.go | 2 ++ builder/openstack/step_add_image_members.go | 1 + builder/openstack/step_allocate_ip.go | 1 + builder/openstack/step_create_image.go | 1 + builder/openstack/step_get_password.go | 1 + builder/openstack/step_key_pair.go | 1 + builder/openstack/step_load_extensions.go | 1 + builder/openstack/step_load_flavor.go | 1 + builder/openstack/step_run_source_server.go | 1 + builder/openstack/step_stop_server.go | 1 + builder/openstack/step_update_image_visibility.go | 1 + builder/openstack/step_wait_for_rackconnect.go | 1 + builder/oracle/oci/step_create_instance.go | 1 + builder/oracle/oci/step_image.go | 1 + builder/oracle/oci/step_instance_info.go | 1 + builder/oracle/oci/step_ssh_key_pair.go | 1 + builder/parallels/common/step_attach_floppy.go | 1 + builder/parallels/common/step_attach_parallels_tools.go | 1 + builder/parallels/common/step_compact_disk.go | 1 + builder/parallels/common/step_output_dir.go | 1 + builder/parallels/common/step_prepare_parallels_tools.go | 1 + builder/parallels/common/step_prlctl.go | 1 + builder/parallels/common/step_run.go | 1 + builder/parallels/common/step_shutdown.go | 1 + builder/parallels/common/step_type_boot_command.go | 1 + builder/parallels/common/step_upload_parallels_tools.go | 1 + builder/parallels/common/step_upload_version.go | 1 + builder/parallels/iso/step_attach_iso.go | 1 + builder/parallels/iso/step_create_disk.go | 1 + builder/parallels/iso/step_create_vm.go | 1 + builder/parallels/iso/step_set_boot_order.go | 1 + builder/parallels/pvm/step_import.go | 1 + builder/profitbricks/builder.go | 1 - builder/profitbricks/step_create_server.go | 1 + builder/profitbricks/step_create_ssh_key.go | 3 +++ builder/profitbricks/step_take_snapshot.go | 1 + builder/qemu/step_boot_wait.go | 4 +++- builder/qemu/step_configure_vnc.go | 1 + builder/qemu/step_convert_disk.go | 1 + builder/qemu/step_copy_disk.go | 1 + builder/qemu/step_create_disk.go | 1 + builder/qemu/step_forward_ssh.go | 1 + builder/qemu/step_prepare_output_dir.go | 5 ++--- builder/qemu/step_resize_disk.go | 1 + builder/qemu/step_run.go | 1 + builder/qemu/step_set_iso.go | 1 + builder/qemu/step_shutdown.go | 1 + builder/qemu/step_type_boot_command.go | 2 +- builder/triton/step_create_image_from_machine.go | 1 + builder/triton/step_create_source_machine.go | 1 + builder/triton/step_delete_machine.go | 1 + builder/triton/step_stop_machine.go | 1 + builder/triton/step_test.go | 3 ++- builder/triton/step_wait_for_stop_to_not_fail.go | 1 + builder/virtualbox/common/step_attach_floppy.go | 5 ++--- builder/virtualbox/common/step_attach_floppy_test.go | 3 +-- builder/virtualbox/common/step_attach_guest_additions.go | 4 +++- builder/virtualbox/common/step_configure_vrdp.go | 1 + builder/virtualbox/common/step_download_guest_additions.go | 1 + builder/virtualbox/common/step_export.go | 5 ++--- builder/virtualbox/common/step_export_test.go | 3 +-- builder/virtualbox/common/step_forward_ssh.go | 1 + builder/virtualbox/common/step_output_dir.go | 1 + builder/virtualbox/common/step_output_dir_test.go | 3 +-- builder/virtualbox/common/step_remove_devices.go | 1 + builder/virtualbox/common/step_remove_devices_test.go | 3 +-- builder/virtualbox/common/step_run.go | 1 + builder/virtualbox/common/step_shutdown.go | 5 ++--- builder/virtualbox/common/step_shutdown_test.go | 4 +--- builder/virtualbox/common/step_suppress_messages.go | 4 +++- builder/virtualbox/common/step_suppress_messages_test.go | 3 +-- builder/virtualbox/common/step_test.go | 3 ++- builder/virtualbox/common/step_type_boot_command.go | 1 + builder/virtualbox/common/step_upload_guest_additions.go | 1 + builder/virtualbox/common/step_upload_version.go | 4 +++- builder/virtualbox/common/step_upload_version_test.go | 3 ++- builder/virtualbox/common/step_vboxmanage.go | 1 + builder/virtualbox/iso/step_attach_iso.go | 1 + builder/virtualbox/iso/step_create_disk.go | 1 + builder/virtualbox/iso/step_create_vm.go | 1 + builder/virtualbox/ovf/step_import.go | 1 + builder/virtualbox/ovf/step_import_test.go | 1 - builder/virtualbox/ovf/step_test.go | 1 - builder/vmware/common/step_clean_files.go | 5 ++--- builder/vmware/common/step_clean_vmx.go | 1 + builder/vmware/common/step_compact_disk.go | 4 +++- builder/vmware/common/step_configure_vmx.go | 1 + builder/vmware/common/step_configure_vnc.go | 1 + builder/vmware/common/step_output_dir.go | 1 + builder/vmware/common/step_output_dir_test.go | 3 +-- builder/vmware/common/step_prepare_tools.go | 1 + builder/vmware/common/step_run.go | 1 + builder/vmware/common/step_run_test.go | 1 + builder/vmware/common/step_shutdown.go | 5 ++--- builder/vmware/common/step_suppress_messages.go | 4 +++- builder/vmware/common/step_test.go | 3 ++- builder/vmware/common/step_type_boot_command.go | 1 + builder/vmware/common/step_upload_tools.go | 1 + builder/vmware/iso/step_create_disk.go | 2 +- builder/vmware/iso/step_create_vmx.go | 1 + builder/vmware/iso/step_export.go | 1 + builder/vmware/iso/step_export_test.go | 3 +-- builder/vmware/iso/step_register.go | 1 + builder/vmware/iso/step_register_test.go | 3 +-- builder/vmware/iso/step_remote_upload.go | 2 +- builder/vmware/iso/step_test.go | 1 - builder/vmware/iso/step_upload_vmx.go | 2 +- builder/vmware/vmx/step_clone_vmx.go | 1 + common/multistep_debug.go | 4 +--- common/step_create_floppy.go | 1 + common/step_create_floppy_test.go | 4 +--- common/step_download.go | 1 + common/step_download_test.go | 3 +-- common/step_http_server.go | 1 + common/step_provision.go | 5 ++--- common/step_provision_test.go | 3 +-- helper/communicator/step_connect.go | 1 + helper/communicator/step_connect_ssh.go | 1 + helper/communicator/step_connect_winrm.go | 1 + post-processor/vagrant-cloud/step_create_provider.go | 2 ++ post-processor/vagrant-cloud/step_create_version.go | 2 ++ post-processor/vagrant-cloud/step_prepare_upload.go | 1 + post-processor/vagrant-cloud/step_release_version.go | 1 + post-processor/vagrant-cloud/step_upload.go | 1 + post-processor/vagrant-cloud/step_verify_box.go | 2 ++ 265 files changed, 340 insertions(+), 141 deletions(-) diff --git a/builder/alicloud/ecs/step_attach_keypair.go b/builder/alicloud/ecs/step_attach_keypair.go index 1bb901f98..8fa2eedfb 100644 --- a/builder/alicloud/ecs/step_attach_keypair.go +++ b/builder/alicloud/ecs/step_attach_keypair.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "fmt" "time" @@ -9,7 +10,6 @@ import ( "github.com/denverdino/aliyungo/ecs" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "time" ) type stepAttachKeyPar struct { diff --git a/builder/alicloud/ecs/step_check_source_image.go b/builder/alicloud/ecs/step_check_source_image.go index b9dc58f69..6090d8868 100644 --- a/builder/alicloud/ecs/step_check_source_image.go +++ b/builder/alicloud/ecs/step_check_source_image.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "fmt" "github.com/denverdino/aliyungo/common" diff --git a/builder/alicloud/ecs/step_config_eip.go b/builder/alicloud/ecs/step_config_eip.go index edf0b2748..c9446bc47 100644 --- a/builder/alicloud/ecs/step_config_eip.go +++ b/builder/alicloud/ecs/step_config_eip.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "fmt" "github.com/denverdino/aliyungo/common" diff --git a/builder/alicloud/ecs/step_config_key_pair.go b/builder/alicloud/ecs/step_config_key_pair.go index 9c68ce92e..e49ae65fb 100644 --- a/builder/alicloud/ecs/step_config_key_pair.go +++ b/builder/alicloud/ecs/step_config_key_pair.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "fmt" "io/ioutil" "os" diff --git a/builder/alicloud/ecs/step_config_public_ip.go b/builder/alicloud/ecs/step_config_public_ip.go index e87a20079..7e0a246e0 100644 --- a/builder/alicloud/ecs/step_config_public_ip.go +++ b/builder/alicloud/ecs/step_config_public_ip.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "fmt" "github.com/denverdino/aliyungo/ecs" diff --git a/builder/alicloud/ecs/step_config_security_group.go b/builder/alicloud/ecs/step_config_security_group.go index 4414eefe6..951f6e6fe 100644 --- a/builder/alicloud/ecs/step_config_security_group.go +++ b/builder/alicloud/ecs/step_config_security_group.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "errors" "fmt" "time" diff --git a/builder/alicloud/ecs/step_config_vpc.go b/builder/alicloud/ecs/step_config_vpc.go index 618b4a3da..36d52838f 100644 --- a/builder/alicloud/ecs/step_config_vpc.go +++ b/builder/alicloud/ecs/step_config_vpc.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "errors" "fmt" "time" diff --git a/builder/alicloud/ecs/step_config_vswitch.go b/builder/alicloud/ecs/step_config_vswitch.go index 5510acb3b..c1494e9d0 100644 --- a/builder/alicloud/ecs/step_config_vswitch.go +++ b/builder/alicloud/ecs/step_config_vswitch.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "errors" "fmt" "time" diff --git a/builder/alicloud/ecs/step_create_image.go b/builder/alicloud/ecs/step_create_image.go index 098323307..ae5840c09 100644 --- a/builder/alicloud/ecs/step_create_image.go +++ b/builder/alicloud/ecs/step_create_image.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "fmt" "github.com/denverdino/aliyungo/common" diff --git a/builder/alicloud/ecs/step_create_instance.go b/builder/alicloud/ecs/step_create_instance.go index 694ee0046..5001fe4df 100644 --- a/builder/alicloud/ecs/step_create_instance.go +++ b/builder/alicloud/ecs/step_create_instance.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "fmt" "io/ioutil" "log" diff --git a/builder/alicloud/ecs/step_delete_images_snapshots.go b/builder/alicloud/ecs/step_delete_images_snapshots.go index 39e56e7bd..d3f6139f0 100644 --- a/builder/alicloud/ecs/step_delete_images_snapshots.go +++ b/builder/alicloud/ecs/step_delete_images_snapshots.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "fmt" "log" diff --git a/builder/alicloud/ecs/step_mount_disk.go b/builder/alicloud/ecs/step_mount_disk.go index 509d06615..642605bee 100644 --- a/builder/alicloud/ecs/step_mount_disk.go +++ b/builder/alicloud/ecs/step_mount_disk.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "fmt" "github.com/denverdino/aliyungo/ecs" diff --git a/builder/alicloud/ecs/step_pre_validate.go b/builder/alicloud/ecs/step_pre_validate.go index bdcad2756..6bc3b1060 100644 --- a/builder/alicloud/ecs/step_pre_validate.go +++ b/builder/alicloud/ecs/step_pre_validate.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "fmt" "github.com/denverdino/aliyungo/common" diff --git a/builder/alicloud/ecs/step_region_copy_image.go b/builder/alicloud/ecs/step_region_copy_image.go index e50398539..dddf08488 100644 --- a/builder/alicloud/ecs/step_region_copy_image.go +++ b/builder/alicloud/ecs/step_region_copy_image.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "fmt" "github.com/denverdino/aliyungo/common" diff --git a/builder/alicloud/ecs/step_run_instance.go b/builder/alicloud/ecs/step_run_instance.go index 2bac6dc91..72491dd1d 100644 --- a/builder/alicloud/ecs/step_run_instance.go +++ b/builder/alicloud/ecs/step_run_instance.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "fmt" "github.com/denverdino/aliyungo/ecs" diff --git a/builder/alicloud/ecs/step_share_image.go b/builder/alicloud/ecs/step_share_image.go index 2f6fbf06f..f954eb421 100644 --- a/builder/alicloud/ecs/step_share_image.go +++ b/builder/alicloud/ecs/step_share_image.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "fmt" "github.com/denverdino/aliyungo/common" diff --git a/builder/alicloud/ecs/step_stop_instance.go b/builder/alicloud/ecs/step_stop_instance.go index 055f0d5d9..d57a52c12 100644 --- a/builder/alicloud/ecs/step_stop_instance.go +++ b/builder/alicloud/ecs/step_stop_instance.go @@ -1,6 +1,7 @@ package ecs import ( + "context" "fmt" "github.com/denverdino/aliyungo/ecs" diff --git a/builder/amazon/chroot/step_attach_volume.go b/builder/amazon/chroot/step_attach_volume.go index f386a031b..01ab32464 100644 --- a/builder/amazon/chroot/step_attach_volume.go +++ b/builder/amazon/chroot/step_attach_volume.go @@ -1,6 +1,7 @@ package chroot import ( + "context" "errors" "fmt" "strings" diff --git a/builder/amazon/chroot/step_check_root_device.go b/builder/amazon/chroot/step_check_root_device.go index 582a76b8d..5ff66d055 100644 --- a/builder/amazon/chroot/step_check_root_device.go +++ b/builder/amazon/chroot/step_check_root_device.go @@ -1,6 +1,7 @@ package chroot import ( + "context" "fmt" "github.com/aws/aws-sdk-go/service/ec2" diff --git a/builder/amazon/chroot/step_chroot_provision.go b/builder/amazon/chroot/step_chroot_provision.go index 6eb4226c5..be8667077 100644 --- a/builder/amazon/chroot/step_chroot_provision.go +++ b/builder/amazon/chroot/step_chroot_provision.go @@ -1,6 +1,7 @@ package chroot import ( + "context" "log" "github.com/hashicorp/packer/helper/multistep" diff --git a/builder/amazon/chroot/step_copy_files.go b/builder/amazon/chroot/step_copy_files.go index d1bdb32b4..a973a5d81 100644 --- a/builder/amazon/chroot/step_copy_files.go +++ b/builder/amazon/chroot/step_copy_files.go @@ -2,14 +2,13 @@ package chroot import ( "bytes" + "context" "fmt" - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "log" "path/filepath" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) // StepCopyFiles copies some files from the host into the chroot environment. diff --git a/builder/amazon/chroot/step_create_volume.go b/builder/amazon/chroot/step_create_volume.go index 10f49b0df..b3c205b26 100644 --- a/builder/amazon/chroot/step_create_volume.go +++ b/builder/amazon/chroot/step_create_volume.go @@ -1,6 +1,7 @@ package chroot import ( + "context" "fmt" "log" diff --git a/builder/amazon/chroot/step_early_cleanup.go b/builder/amazon/chroot/step_early_cleanup.go index 449cb2a89..34e7817df 100644 --- a/builder/amazon/chroot/step_early_cleanup.go +++ b/builder/amazon/chroot/step_early_cleanup.go @@ -1,10 +1,12 @@ package chroot import ( + "context" "fmt" + "log" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "log" ) // StepEarlyCleanup performs some of the cleanup steps early in order to diff --git a/builder/amazon/chroot/step_early_unflock.go b/builder/amazon/chroot/step_early_unflock.go index 8c15713f8..225e91fb9 100644 --- a/builder/amazon/chroot/step_early_unflock.go +++ b/builder/amazon/chroot/step_early_unflock.go @@ -1,10 +1,12 @@ package chroot import ( + "context" "fmt" + "log" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "log" ) // StepEarlyUnflock unlocks the flock. diff --git a/builder/amazon/chroot/step_flock.go b/builder/amazon/chroot/step_flock.go index d7ef614ff..d75adc7f0 100644 --- a/builder/amazon/chroot/step_flock.go +++ b/builder/amazon/chroot/step_flock.go @@ -1,15 +1,14 @@ package chroot import ( + "context" "fmt" - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "log" "os" "path/filepath" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) // StepFlock provisions the instance within a chroot. diff --git a/builder/amazon/chroot/step_instance_info.go b/builder/amazon/chroot/step_instance_info.go index 8811a49ff..558e28a8d 100644 --- a/builder/amazon/chroot/step_instance_info.go +++ b/builder/amazon/chroot/step_instance_info.go @@ -1,6 +1,7 @@ package chroot import ( + "context" "fmt" "log" diff --git a/builder/amazon/chroot/step_mount_device.go b/builder/amazon/chroot/step_mount_device.go index 06fae4210..f9fc7b0a8 100644 --- a/builder/amazon/chroot/step_mount_device.go +++ b/builder/amazon/chroot/step_mount_device.go @@ -2,6 +2,7 @@ package chroot import ( "bytes" + "context" "fmt" "log" "os" diff --git a/builder/amazon/chroot/step_mount_extra.go b/builder/amazon/chroot/step_mount_extra.go index 7ebbb650a..ffd8ac027 100644 --- a/builder/amazon/chroot/step_mount_extra.go +++ b/builder/amazon/chroot/step_mount_extra.go @@ -2,15 +2,14 @@ package chroot import ( "bytes" + "context" "fmt" - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "os" "os/exec" "syscall" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) // StepMountExtra mounts the attached device. diff --git a/builder/amazon/chroot/step_post_mount_commands.go b/builder/amazon/chroot/step_post_mount_commands.go index 220e32a07..a00e8e1bf 100644 --- a/builder/amazon/chroot/step_post_mount_commands.go +++ b/builder/amazon/chroot/step_post_mount_commands.go @@ -1,6 +1,8 @@ package chroot import ( + "context" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" ) diff --git a/builder/amazon/chroot/step_pre_mount_commands.go b/builder/amazon/chroot/step_pre_mount_commands.go index b3a8aae6b..ce3c26e02 100644 --- a/builder/amazon/chroot/step_pre_mount_commands.go +++ b/builder/amazon/chroot/step_pre_mount_commands.go @@ -1,6 +1,8 @@ package chroot import ( + "context" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" ) diff --git a/builder/amazon/chroot/step_prepare_device.go b/builder/amazon/chroot/step_prepare_device.go index 4724457e5..0939d33cd 100644 --- a/builder/amazon/chroot/step_prepare_device.go +++ b/builder/amazon/chroot/step_prepare_device.go @@ -1,6 +1,7 @@ package chroot import ( + "context" "fmt" "log" "os" diff --git a/builder/amazon/chroot/step_register_ami.go b/builder/amazon/chroot/step_register_ami.go index d73ea8b21..6fa9838b0 100644 --- a/builder/amazon/chroot/step_register_ami.go +++ b/builder/amazon/chroot/step_register_ami.go @@ -1,6 +1,7 @@ package chroot import ( + "context" "fmt" "github.com/aws/aws-sdk-go/aws" diff --git a/builder/amazon/chroot/step_snapshot.go b/builder/amazon/chroot/step_snapshot.go index 68a7bce2c..3fb3ff701 100644 --- a/builder/amazon/chroot/step_snapshot.go +++ b/builder/amazon/chroot/step_snapshot.go @@ -1,6 +1,7 @@ package chroot import ( + "context" "errors" "fmt" "time" diff --git a/builder/amazon/common/step_ami_region_copy.go b/builder/amazon/common/step_ami_region_copy.go index 9125453ea..a3d92b467 100644 --- a/builder/amazon/common/step_ami_region_copy.go +++ b/builder/amazon/common/step_ami_region_copy.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "sync" diff --git a/builder/amazon/common/step_create_tags.go b/builder/amazon/common/step_create_tags.go index 903aea91a..47078b6ac 100644 --- a/builder/amazon/common/step_create_tags.go +++ b/builder/amazon/common/step_create_tags.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "github.com/aws/aws-sdk-go/aws" diff --git a/builder/amazon/common/step_deregister_ami.go b/builder/amazon/common/step_deregister_ami.go index 549987b6b..9c176d3c7 100644 --- a/builder/amazon/common/step_deregister_ami.go +++ b/builder/amazon/common/step_deregister_ami.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "github.com/aws/aws-sdk-go/aws" diff --git a/builder/amazon/common/step_encrypted_ami.go b/builder/amazon/common/step_encrypted_ami.go index 66174bea0..a07c0ee25 100644 --- a/builder/amazon/common/step_encrypted_ami.go +++ b/builder/amazon/common/step_encrypted_ami.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" diff --git a/builder/amazon/common/step_get_password.go b/builder/amazon/common/step_get_password.go index 28847003d..5e2a236c2 100644 --- a/builder/amazon/common/step_get_password.go +++ b/builder/amazon/common/step_get_password.go @@ -1,6 +1,7 @@ package common import ( + "context" "crypto/rsa" "crypto/x509" "encoding/base64" diff --git a/builder/amazon/common/step_key_pair.go b/builder/amazon/common/step_key_pair.go index 3558b1df2..927101fcf 100644 --- a/builder/amazon/common/step_key_pair.go +++ b/builder/amazon/common/step_key_pair.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "io/ioutil" "os" diff --git a/builder/amazon/common/step_modify_ami_attributes.go b/builder/amazon/common/step_modify_ami_attributes.go index 7ba1deb6f..26ab31986 100644 --- a/builder/amazon/common/step_modify_ami_attributes.go +++ b/builder/amazon/common/step_modify_ami_attributes.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "github.com/aws/aws-sdk-go/aws" diff --git a/builder/amazon/common/step_modify_ebs_instance.go b/builder/amazon/common/step_modify_ebs_instance.go index 4145bc669..c2c454e06 100644 --- a/builder/amazon/common/step_modify_ebs_instance.go +++ b/builder/amazon/common/step_modify_ebs_instance.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "github.com/aws/aws-sdk-go/aws" diff --git a/builder/amazon/common/step_pre_validate.go b/builder/amazon/common/step_pre_validate.go index 57fca3fad..73b4022b7 100644 --- a/builder/amazon/common/step_pre_validate.go +++ b/builder/amazon/common/step_pre_validate.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "github.com/aws/aws-sdk-go/aws" diff --git a/builder/amazon/common/step_run_spot_instance.go b/builder/amazon/common/step_run_spot_instance.go index 6029ac617..c5e3382ec 100644 --- a/builder/amazon/common/step_run_spot_instance.go +++ b/builder/amazon/common/step_run_spot_instance.go @@ -1,6 +1,7 @@ package common import ( + "context" "encoding/base64" "fmt" "io/ioutil" diff --git a/builder/amazon/common/step_security_group.go b/builder/amazon/common/step_security_group.go index 3d3ff8f35..031842cd3 100644 --- a/builder/amazon/common/step_security_group.go +++ b/builder/amazon/common/step_security_group.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "time" diff --git a/builder/amazon/common/step_source_ami_info.go b/builder/amazon/common/step_source_ami_info.go index bc3b9dd17..5e57c2fbf 100644 --- a/builder/amazon/common/step_source_ami_info.go +++ b/builder/amazon/common/step_source_ami_info.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "sort" diff --git a/builder/amazon/common/step_stop_ebs_instance.go b/builder/amazon/common/step_stop_ebs_instance.go index efef99b8a..10a2f5a45 100644 --- a/builder/amazon/common/step_stop_ebs_instance.go +++ b/builder/amazon/common/step_stop_ebs_instance.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "github.com/aws/aws-sdk-go/aws/awserr" diff --git a/builder/amazon/ebs/step_cleanup_volumes.go b/builder/amazon/ebs/step_cleanup_volumes.go index 158f970e0..3fd0de64f 100644 --- a/builder/amazon/ebs/step_cleanup_volumes.go +++ b/builder/amazon/ebs/step_cleanup_volumes.go @@ -1,6 +1,7 @@ package ebs import ( + "context" "fmt" "github.com/aws/aws-sdk-go/aws" diff --git a/builder/amazon/ebs/step_create_ami.go b/builder/amazon/ebs/step_create_ami.go index 1ee7319bd..0dde4fc30 100644 --- a/builder/amazon/ebs/step_create_ami.go +++ b/builder/amazon/ebs/step_create_ami.go @@ -1,6 +1,7 @@ package ebs import ( + "context" "fmt" "github.com/aws/aws-sdk-go/service/ec2" diff --git a/builder/amazon/ebssurrogate/step_register_ami.go b/builder/amazon/ebssurrogate/step_register_ami.go index 28c01f52d..002ed00af 100644 --- a/builder/amazon/ebssurrogate/step_register_ami.go +++ b/builder/amazon/ebssurrogate/step_register_ami.go @@ -1,6 +1,7 @@ package ebssurrogate import ( + "context" "fmt" "github.com/aws/aws-sdk-go/aws" diff --git a/builder/amazon/ebssurrogate/step_snapshot_new_root.go b/builder/amazon/ebssurrogate/step_snapshot_new_root.go index 111f20268..3b607fbd0 100644 --- a/builder/amazon/ebssurrogate/step_snapshot_new_root.go +++ b/builder/amazon/ebssurrogate/step_snapshot_new_root.go @@ -1,6 +1,7 @@ package ebssurrogate import ( + "context" "errors" "fmt" "time" diff --git a/builder/amazon/ebsvolume/step_tag_ebs_volumes.go b/builder/amazon/ebsvolume/step_tag_ebs_volumes.go index 42076dec2..a638ec439 100644 --- a/builder/amazon/ebsvolume/step_tag_ebs_volumes.go +++ b/builder/amazon/ebsvolume/step_tag_ebs_volumes.go @@ -1,6 +1,7 @@ package ebsvolume import ( + "context" "fmt" "github.com/aws/aws-sdk-go/service/ec2" diff --git a/builder/amazon/instance/step_bundle_volume.go b/builder/amazon/instance/step_bundle_volume.go index 61c2f5aad..1c8b006b8 100644 --- a/builder/amazon/instance/step_bundle_volume.go +++ b/builder/amazon/instance/step_bundle_volume.go @@ -1,6 +1,7 @@ package instance import ( + "context" "fmt" "github.com/aws/aws-sdk-go/service/ec2" diff --git a/builder/amazon/instance/step_register_ami.go b/builder/amazon/instance/step_register_ami.go index 9fb41d441..c46ff8ae4 100644 --- a/builder/amazon/instance/step_register_ami.go +++ b/builder/amazon/instance/step_register_ami.go @@ -1,6 +1,7 @@ package instance import ( + "context" "fmt" "github.com/aws/aws-sdk-go/aws" diff --git a/builder/amazon/instance/step_upload_bundle.go b/builder/amazon/instance/step_upload_bundle.go index 80ba9e88b..1e7711d42 100644 --- a/builder/amazon/instance/step_upload_bundle.go +++ b/builder/amazon/instance/step_upload_bundle.go @@ -1,6 +1,7 @@ package instance import ( + "context" "fmt" "github.com/hashicorp/packer/helper/multistep" diff --git a/builder/amazon/instance/step_upload_x509_cert.go b/builder/amazon/instance/step_upload_x509_cert.go index 3853a53c1..14ea955e5 100644 --- a/builder/amazon/instance/step_upload_x509_cert.go +++ b/builder/amazon/instance/step_upload_x509_cert.go @@ -1,10 +1,12 @@ package instance import ( + "context" "fmt" + "os" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "os" ) type StepUploadX509Cert struct{} diff --git a/builder/azure/arm/step_capture_image.go b/builder/azure/arm/step_capture_image.go index 2da5bedc4..9e640a891 100644 --- a/builder/azure/arm/step_capture_image.go +++ b/builder/azure/arm/step_capture_image.go @@ -1,6 +1,7 @@ package arm import ( + "context" "fmt" "github.com/Azure/azure-sdk-for-go/arm/compute" diff --git a/builder/azure/arm/step_create_resource_group.go b/builder/azure/arm/step_create_resource_group.go index 787aad132..e0535adf6 100644 --- a/builder/azure/arm/step_create_resource_group.go +++ b/builder/azure/arm/step_create_resource_group.go @@ -1,6 +1,7 @@ package arm import ( + "context" "errors" "fmt" diff --git a/builder/azure/arm/step_delete_os_disk.go b/builder/azure/arm/step_delete_os_disk.go index 92e9f9757..723c87db0 100644 --- a/builder/azure/arm/step_delete_os_disk.go +++ b/builder/azure/arm/step_delete_os_disk.go @@ -1,6 +1,7 @@ package arm import ( + "context" "errors" "fmt" "net/url" diff --git a/builder/azure/arm/step_delete_resource_group.go b/builder/azure/arm/step_delete_resource_group.go index a3bc2073b..a16ebf8f2 100644 --- a/builder/azure/arm/step_delete_resource_group.go +++ b/builder/azure/arm/step_delete_resource_group.go @@ -1,6 +1,7 @@ package arm import ( + "context" "fmt" "github.com/Azure/go-autorest/autorest" diff --git a/builder/azure/arm/step_deploy_template.go b/builder/azure/arm/step_deploy_template.go index 06baddb24..af838c301 100644 --- a/builder/azure/arm/step_deploy_template.go +++ b/builder/azure/arm/step_deploy_template.go @@ -1,6 +1,7 @@ package arm import ( + "context" "errors" "fmt" "net/url" diff --git a/builder/azure/arm/step_get_certificate.go b/builder/azure/arm/step_get_certificate.go index df347e468..784826771 100644 --- a/builder/azure/arm/step_get_certificate.go +++ b/builder/azure/arm/step_get_certificate.go @@ -1,6 +1,7 @@ package arm import ( + "context" "fmt" "time" diff --git a/builder/azure/arm/step_get_ip_address.go b/builder/azure/arm/step_get_ip_address.go index f6ef7dc1b..ee28f3054 100644 --- a/builder/azure/arm/step_get_ip_address.go +++ b/builder/azure/arm/step_get_ip_address.go @@ -1,6 +1,7 @@ package arm import ( + "context" "fmt" "github.com/hashicorp/packer/builder/azure/common/constants" diff --git a/builder/azure/arm/step_get_os_disk.go b/builder/azure/arm/step_get_os_disk.go index 706f37a54..5e32e0eea 100644 --- a/builder/azure/arm/step_get_os_disk.go +++ b/builder/azure/arm/step_get_os_disk.go @@ -1,6 +1,7 @@ package arm import ( + "context" "fmt" "github.com/Azure/azure-sdk-for-go/arm/compute" diff --git a/builder/azure/arm/step_power_off_compute.go b/builder/azure/arm/step_power_off_compute.go index e44b13c97..693348325 100644 --- a/builder/azure/arm/step_power_off_compute.go +++ b/builder/azure/arm/step_power_off_compute.go @@ -1,6 +1,7 @@ package arm import ( + "context" "fmt" "github.com/hashicorp/packer/builder/azure/common" diff --git a/builder/azure/arm/step_set_certificate.go b/builder/azure/arm/step_set_certificate.go index 4729af0c0..ef8832074 100644 --- a/builder/azure/arm/step_set_certificate.go +++ b/builder/azure/arm/step_set_certificate.go @@ -1,6 +1,8 @@ package arm import ( + "context" + "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" diff --git a/builder/azure/arm/step_test.go b/builder/azure/arm/step_test.go index c0115b003..aa46455e0 100644 --- a/builder/azure/arm/step_test.go +++ b/builder/azure/arm/step_test.go @@ -7,7 +7,6 @@ import ( "github.com/hashicorp/packer/builder/azure/common" "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/hashicorp/packer/helper/multistep" - "testing" ) func TestProcessStepResultShouldContinueForNonErrors(t *testing.T) { diff --git a/builder/azure/arm/step_validate_template.go b/builder/azure/arm/step_validate_template.go index bdf92e652..92927de5a 100644 --- a/builder/azure/arm/step_validate_template.go +++ b/builder/azure/arm/step_validate_template.go @@ -1,6 +1,7 @@ package arm import ( + "context" "fmt" "github.com/hashicorp/packer/builder/azure/common/constants" diff --git a/builder/azure/common/lin/step_create_cert.go b/builder/azure/common/lin/step_create_cert.go index 66dda1a3c..da2cb5bf5 100644 --- a/builder/azure/common/lin/step_create_cert.go +++ b/builder/azure/common/lin/step_create_cert.go @@ -1,6 +1,7 @@ package lin import ( + "context" "crypto/rand" "crypto/rsa" "crypto/sha1" diff --git a/builder/azure/common/lin/step_generalize_os.go b/builder/azure/common/lin/step_generalize_os.go index d7836d22c..cc62f4eec 100644 --- a/builder/azure/common/lin/step_generalize_os.go +++ b/builder/azure/common/lin/step_generalize_os.go @@ -2,10 +2,12 @@ package lin import ( "bytes" + "context" "fmt" + "log" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "log" ) type StepGeneralizeOS struct { diff --git a/builder/cloudstack/step_configure_networking.go b/builder/cloudstack/step_configure_networking.go index 1e2e322b0..ff37a540a 100644 --- a/builder/cloudstack/step_configure_networking.go +++ b/builder/cloudstack/step_configure_networking.go @@ -1,6 +1,7 @@ package cloudstack import ( + "context" "fmt" "math/rand" "strings" diff --git a/builder/cloudstack/step_create_instance.go b/builder/cloudstack/step_create_instance.go index 1ca0a4f70..19f6a3c28 100644 --- a/builder/cloudstack/step_create_instance.go +++ b/builder/cloudstack/step_create_instance.go @@ -1,6 +1,7 @@ package cloudstack import ( + "context" "encoding/base64" "errors" "fmt" diff --git a/builder/cloudstack/step_create_security_group.go b/builder/cloudstack/step_create_security_group.go index fb5f24a4a..c42eec5d5 100644 --- a/builder/cloudstack/step_create_security_group.go +++ b/builder/cloudstack/step_create_security_group.go @@ -1,6 +1,7 @@ package cloudstack import ( + "context" "fmt" "github.com/hashicorp/packer/common/uuid" diff --git a/builder/cloudstack/step_create_template.go b/builder/cloudstack/step_create_template.go index 928e231d1..4afba8699 100644 --- a/builder/cloudstack/step_create_template.go +++ b/builder/cloudstack/step_create_template.go @@ -1,6 +1,7 @@ package cloudstack import ( + "context" "fmt" "time" diff --git a/builder/cloudstack/step_keypair.go b/builder/cloudstack/step_keypair.go index 7334da372..e1f002b76 100644 --- a/builder/cloudstack/step_keypair.go +++ b/builder/cloudstack/step_keypair.go @@ -1,6 +1,7 @@ package cloudstack import ( + "context" "fmt" "io/ioutil" "os" diff --git a/builder/cloudstack/step_prepare_config.go b/builder/cloudstack/step_prepare_config.go index 3c2944c7d..644547018 100644 --- a/builder/cloudstack/step_prepare_config.go +++ b/builder/cloudstack/step_prepare_config.go @@ -1,6 +1,7 @@ package cloudstack import ( + "context" "fmt" "io/ioutil" "regexp" diff --git a/builder/cloudstack/step_shutdown_instance.go b/builder/cloudstack/step_shutdown_instance.go index 10a4acbdd..a7f07e8b2 100644 --- a/builder/cloudstack/step_shutdown_instance.go +++ b/builder/cloudstack/step_shutdown_instance.go @@ -1,6 +1,7 @@ package cloudstack import ( + "context" "fmt" "github.com/hashicorp/packer/helper/multistep" diff --git a/builder/docker/step_commit.go b/builder/docker/step_commit.go index d32f5f888..d248ee64c 100644 --- a/builder/docker/step_commit.go +++ b/builder/docker/step_commit.go @@ -1,7 +1,9 @@ package docker import ( + "context" "fmt" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" ) diff --git a/builder/docker/step_commit_test.go b/builder/docker/step_commit_test.go index b828aa3e2..ff2db0ad7 100644 --- a/builder/docker/step_commit_test.go +++ b/builder/docker/step_commit_test.go @@ -2,10 +2,9 @@ package docker import ( "errors" - "github.com/hashicorp/packer/helper/multistep" "testing" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func testStepCommitState(t *testing.T) multistep.StateBag { diff --git a/builder/docker/step_connect_docker.go b/builder/docker/step_connect_docker.go index 2e3a3270a..ef0222a91 100644 --- a/builder/docker/step_connect_docker.go +++ b/builder/docker/step_connect_docker.go @@ -1,12 +1,12 @@ package docker import ( + "context" "fmt" - "github.com/hashicorp/packer/helper/multistep" "os/exec" "strings" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) type StepConnectDocker struct{} diff --git a/builder/docker/step_export.go b/builder/docker/step_export.go index b11319f81..138e0f00c 100644 --- a/builder/docker/step_export.go +++ b/builder/docker/step_export.go @@ -1,6 +1,7 @@ package docker import ( + "context" "fmt" "os" "path/filepath" diff --git a/builder/docker/step_export_test.go b/builder/docker/step_export_test.go index 622d0ee5a..1b1221e62 100644 --- a/builder/docker/step_export_test.go +++ b/builder/docker/step_export_test.go @@ -3,12 +3,11 @@ package docker import ( "bytes" "errors" - "github.com/hashicorp/packer/helper/multistep" "io/ioutil" "os" "testing" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func testStepExportState(t *testing.T) multistep.StateBag { diff --git a/builder/docker/step_pull.go b/builder/docker/step_pull.go index 946029943..fd011680e 100644 --- a/builder/docker/step_pull.go +++ b/builder/docker/step_pull.go @@ -1,6 +1,7 @@ package docker import ( + "context" "fmt" "log" diff --git a/builder/docker/step_pull_test.go b/builder/docker/step_pull_test.go index 6bd3d5e84..9b8ed1d1b 100644 --- a/builder/docker/step_pull_test.go +++ b/builder/docker/step_pull_test.go @@ -2,10 +2,9 @@ package docker import ( "errors" - "github.com/hashicorp/packer/helper/multistep" "testing" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func TestStepPull_impl(t *testing.T) { diff --git a/builder/docker/step_run.go b/builder/docker/step_run.go index c5b8fc525..1d2ba6862 100644 --- a/builder/docker/step_run.go +++ b/builder/docker/step_run.go @@ -1,7 +1,9 @@ package docker import ( + "context" "fmt" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" ) diff --git a/builder/docker/step_run_test.go b/builder/docker/step_run_test.go index 66bd02baf..9993cb357 100644 --- a/builder/docker/step_run_test.go +++ b/builder/docker/step_run_test.go @@ -1,11 +1,11 @@ package docker import ( + "context" "errors" - "github.com/hashicorp/packer/helper/multistep" "testing" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func testStepRunState(t *testing.T) multistep.StateBag { diff --git a/builder/docker/step_temp_dir.go b/builder/docker/step_temp_dir.go index d3c1502ff..a5b1d6ade 100644 --- a/builder/docker/step_temp_dir.go +++ b/builder/docker/step_temp_dir.go @@ -1,14 +1,13 @@ package docker import ( + "context" "fmt" - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "io/ioutil" "os" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) // StepTempDir creates a temporary directory that we use in order to diff --git a/builder/docker/step_test.go b/builder/docker/step_test.go index fa0702612..0c7d56649 100644 --- a/builder/docker/step_test.go +++ b/builder/docker/step_test.go @@ -2,9 +2,10 @@ package docker import ( "bytes" + "testing" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "testing" ) func testState(t *testing.T) multistep.StateBag { diff --git a/builder/googlecompute/step_check_existing_image.go b/builder/googlecompute/step_check_existing_image.go index 92a79f3fa..ac11600e1 100644 --- a/builder/googlecompute/step_check_existing_image.go +++ b/builder/googlecompute/step_check_existing_image.go @@ -1,6 +1,7 @@ package googlecompute import ( + "context" "fmt" "github.com/hashicorp/packer/helper/multistep" diff --git a/builder/googlecompute/step_check_existing_image_test.go b/builder/googlecompute/step_check_existing_image_test.go index 36f9e110a..1c499e743 100644 --- a/builder/googlecompute/step_check_existing_image_test.go +++ b/builder/googlecompute/step_check_existing_image_test.go @@ -1,10 +1,9 @@ package googlecompute import ( - "github.com/hashicorp/packer/helper/multistep" "testing" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func TestStepCheckExistingImage_impl(t *testing.T) { diff --git a/builder/googlecompute/step_create_image.go b/builder/googlecompute/step_create_image.go index 16434f6c7..72e6a06eb 100644 --- a/builder/googlecompute/step_create_image.go +++ b/builder/googlecompute/step_create_image.go @@ -1,6 +1,7 @@ package googlecompute import ( + "context" "errors" "fmt" "time" diff --git a/builder/googlecompute/step_create_instance.go b/builder/googlecompute/step_create_instance.go index 1a713f123..ee3b6643b 100644 --- a/builder/googlecompute/step_create_instance.go +++ b/builder/googlecompute/step_create_instance.go @@ -1,6 +1,7 @@ package googlecompute import ( + "context" "errors" "fmt" "io/ioutil" diff --git a/builder/googlecompute/step_create_ssh_key.go b/builder/googlecompute/step_create_ssh_key.go index f121e3dae..7d5a24555 100644 --- a/builder/googlecompute/step_create_ssh_key.go +++ b/builder/googlecompute/step_create_ssh_key.go @@ -1,6 +1,7 @@ package googlecompute import ( + "context" "crypto/rand" "crypto/rsa" "crypto/x509" diff --git a/builder/googlecompute/step_create_windows_password.go b/builder/googlecompute/step_create_windows_password.go index b7d09e10d..3386f6fbc 100644 --- a/builder/googlecompute/step_create_windows_password.go +++ b/builder/googlecompute/step_create_windows_password.go @@ -1,6 +1,7 @@ package googlecompute import ( + "context" "crypto/rand" "crypto/rsa" "crypto/x509" diff --git a/builder/googlecompute/step_instance_info.go b/builder/googlecompute/step_instance_info.go index 5604b3e9b..d67984b75 100644 --- a/builder/googlecompute/step_instance_info.go +++ b/builder/googlecompute/step_instance_info.go @@ -1,6 +1,7 @@ package googlecompute import ( + "context" "errors" "fmt" "time" diff --git a/builder/googlecompute/step_instance_info_test.go b/builder/googlecompute/step_instance_info_test.go index 8ced83c5d..3918a009e 100644 --- a/builder/googlecompute/step_instance_info_test.go +++ b/builder/googlecompute/step_instance_info_test.go @@ -2,11 +2,10 @@ package googlecompute import ( "errors" - "github.com/hashicorp/packer/helper/multistep" "testing" "time" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func TestStepInstanceInfo_impl(t *testing.T) { diff --git a/builder/googlecompute/step_teardown_instance.go b/builder/googlecompute/step_teardown_instance.go index e40e2fc7b..27f9fee35 100644 --- a/builder/googlecompute/step_teardown_instance.go +++ b/builder/googlecompute/step_teardown_instance.go @@ -1,6 +1,7 @@ package googlecompute import ( + "context" "errors" "fmt" "time" diff --git a/builder/googlecompute/step_teardown_instance_test.go b/builder/googlecompute/step_teardown_instance_test.go index 295230e01..f19dac960 100644 --- a/builder/googlecompute/step_teardown_instance_test.go +++ b/builder/googlecompute/step_teardown_instance_test.go @@ -1,10 +1,9 @@ package googlecompute import ( - "github.com/hashicorp/packer/helper/multistep" "testing" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func TestStepTeardownInstance_impl(t *testing.T) { diff --git a/builder/googlecompute/step_wait_startup_script.go b/builder/googlecompute/step_wait_startup_script.go index 9770d7cb3..efc2a78f7 100644 --- a/builder/googlecompute/step_wait_startup_script.go +++ b/builder/googlecompute/step_wait_startup_script.go @@ -1,6 +1,7 @@ package googlecompute import ( + "context" "errors" "fmt" diff --git a/builder/googlecompute/step_wait_startup_script_test.go b/builder/googlecompute/step_wait_startup_script_test.go index a48176a61..51643eb2d 100644 --- a/builder/googlecompute/step_wait_startup_script_test.go +++ b/builder/googlecompute/step_wait_startup_script_test.go @@ -1,6 +1,8 @@ package googlecompute import ( + "testing" + "github.com/hashicorp/packer/helper/multistep" "github.com/stretchr/testify/assert" ) diff --git a/builder/hyperv/common/step_clone_vm.go b/builder/hyperv/common/step_clone_vm.go index cda0c5da5..f6dc9e390 100644 --- a/builder/hyperv/common/step_clone_vm.go +++ b/builder/hyperv/common/step_clone_vm.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "path/filepath" diff --git a/builder/hyperv/common/step_configure_ip.go b/builder/hyperv/common/step_configure_ip.go index d9ca74344..41d945a0d 100644 --- a/builder/hyperv/common/step_configure_ip.go +++ b/builder/hyperv/common/step_configure_ip.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "strings" diff --git a/builder/hyperv/common/step_configure_vlan.go b/builder/hyperv/common/step_configure_vlan.go index ea26af22e..a167b9ed1 100644 --- a/builder/hyperv/common/step_configure_vlan.go +++ b/builder/hyperv/common/step_configure_vlan.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "github.com/hashicorp/packer/helper/multistep" diff --git a/builder/hyperv/common/step_create_external_switch.go b/builder/hyperv/common/step_create_external_switch.go index 1e0ea6976..56e6fa6e8 100644 --- a/builder/hyperv/common/step_create_external_switch.go +++ b/builder/hyperv/common/step_create_external_switch.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "github.com/hashicorp/packer/common/uuid" diff --git a/builder/hyperv/common/step_create_switch.go b/builder/hyperv/common/step_create_switch.go index 0b1df3342..4b5ef48e2 100644 --- a/builder/hyperv/common/step_create_switch.go +++ b/builder/hyperv/common/step_create_switch.go @@ -1,7 +1,9 @@ package common import ( + "context" "fmt" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" ) diff --git a/builder/hyperv/common/step_create_tempdir.go b/builder/hyperv/common/step_create_tempdir.go index a9829608c..1a9767fe5 100644 --- a/builder/hyperv/common/step_create_tempdir.go +++ b/builder/hyperv/common/step_create_tempdir.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "io/ioutil" "os" diff --git a/builder/hyperv/common/step_create_vm.go b/builder/hyperv/common/step_create_vm.go index 1e28889c7..291fdc5dc 100644 --- a/builder/hyperv/common/step_create_vm.go +++ b/builder/hyperv/common/step_create_vm.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "path/filepath" diff --git a/builder/hyperv/common/step_disable_vlan.go b/builder/hyperv/common/step_disable_vlan.go index acd0d323d..0d4882ec1 100644 --- a/builder/hyperv/common/step_disable_vlan.go +++ b/builder/hyperv/common/step_disable_vlan.go @@ -1,7 +1,9 @@ package common import ( + "context" "fmt" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" ) diff --git a/builder/hyperv/common/step_enable_integration_service.go b/builder/hyperv/common/step_enable_integration_service.go index ddb74c41d..e3f8fd70a 100644 --- a/builder/hyperv/common/step_enable_integration_service.go +++ b/builder/hyperv/common/step_enable_integration_service.go @@ -1,7 +1,9 @@ package common import ( + "context" "fmt" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" ) diff --git a/builder/hyperv/common/step_export_vm.go b/builder/hyperv/common/step_export_vm.go index f5ff4cf93..6de5dbb70 100644 --- a/builder/hyperv/common/step_export_vm.go +++ b/builder/hyperv/common/step_export_vm.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "io/ioutil" "path/filepath" diff --git a/builder/hyperv/common/step_mount_dvddrive.go b/builder/hyperv/common/step_mount_dvddrive.go index 8957fe6c2..945c6a86d 100644 --- a/builder/hyperv/common/step_mount_dvddrive.go +++ b/builder/hyperv/common/step_mount_dvddrive.go @@ -1,15 +1,14 @@ package common import ( + "context" "fmt" - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "log" "path/filepath" "strings" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) type StepMountDvdDrive struct { diff --git a/builder/hyperv/common/step_mount_floppydrive.go b/builder/hyperv/common/step_mount_floppydrive.go index ecf9b0194..1ae03d1db 100644 --- a/builder/hyperv/common/step_mount_floppydrive.go +++ b/builder/hyperv/common/step_mount_floppydrive.go @@ -1,17 +1,16 @@ package common import ( + "context" "fmt" - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "io" "io/ioutil" "log" "os" "path/filepath" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) const ( diff --git a/builder/hyperv/common/step_mount_guest_additions.go b/builder/hyperv/common/step_mount_guest_additions.go index f20e070d3..71b6c3eec 100644 --- a/builder/hyperv/common/step_mount_guest_additions.go +++ b/builder/hyperv/common/step_mount_guest_additions.go @@ -1,10 +1,12 @@ package common import ( + "context" "fmt" + "log" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "log" ) type StepMountGuestAdditions struct { diff --git a/builder/hyperv/common/step_mount_secondary_dvd_images.go b/builder/hyperv/common/step_mount_secondary_dvd_images.go index 9b29a84a0..c23e39fac 100644 --- a/builder/hyperv/common/step_mount_secondary_dvd_images.go +++ b/builder/hyperv/common/step_mount_secondary_dvd_images.go @@ -1,10 +1,12 @@ package common import ( + "context" "fmt" + "log" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "log" ) type StepMountSecondaryDvdImages struct { diff --git a/builder/hyperv/common/step_output_dir.go b/builder/hyperv/common/step_output_dir.go index cad96b98e..fc39d08b2 100644 --- a/builder/hyperv/common/step_output_dir.go +++ b/builder/hyperv/common/step_output_dir.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "os" diff --git a/builder/hyperv/common/step_polling_installation.go b/builder/hyperv/common/step_polling_installation.go index 092c01b17..b9d2984f6 100644 --- a/builder/hyperv/common/step_polling_installation.go +++ b/builder/hyperv/common/step_polling_installation.go @@ -2,6 +2,7 @@ package common import ( "bytes" + "context" "fmt" "log" "os/exec" diff --git a/builder/hyperv/common/step_reboot_vm.go b/builder/hyperv/common/step_reboot_vm.go index 850c6aac9..8e2bec1b8 100644 --- a/builder/hyperv/common/step_reboot_vm.go +++ b/builder/hyperv/common/step_reboot_vm.go @@ -1,10 +1,12 @@ package common import ( + "context" "fmt" + "time" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "time" ) type StepRebootVm struct { diff --git a/builder/hyperv/common/step_run.go b/builder/hyperv/common/step_run.go index ead739667..cd8213c5e 100644 --- a/builder/hyperv/common/step_run.go +++ b/builder/hyperv/common/step_run.go @@ -1,10 +1,12 @@ package common import ( + "context" "fmt" + "time" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "time" ) type StepRun struct { diff --git a/builder/hyperv/common/step_shutdown.go b/builder/hyperv/common/step_shutdown.go index ddced9619..b37716f60 100644 --- a/builder/hyperv/common/step_shutdown.go +++ b/builder/hyperv/common/step_shutdown.go @@ -2,6 +2,7 @@ package common import ( "bytes" + "context" "errors" "fmt" "log" diff --git a/builder/hyperv/common/step_sleep.go b/builder/hyperv/common/step_sleep.go index fbf671cdf..e65bcf0b1 100644 --- a/builder/hyperv/common/step_sleep.go +++ b/builder/hyperv/common/step_sleep.go @@ -1,10 +1,12 @@ package common import ( + "context" "fmt" + "time" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "time" ) type StepSleep struct { diff --git a/builder/hyperv/common/step_type_boot_command.go b/builder/hyperv/common/step_type_boot_command.go index 515c30907..43deee1fd 100644 --- a/builder/hyperv/common/step_type_boot_command.go +++ b/builder/hyperv/common/step_type_boot_command.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "strings" diff --git a/builder/hyperv/common/step_unmount_dvddrive.go b/builder/hyperv/common/step_unmount_dvddrive.go index cb62bc131..010e8b067 100644 --- a/builder/hyperv/common/step_unmount_dvddrive.go +++ b/builder/hyperv/common/step_unmount_dvddrive.go @@ -1,7 +1,9 @@ package common import ( + "context" "fmt" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" ) diff --git a/builder/hyperv/common/step_unmount_floppydrive.go b/builder/hyperv/common/step_unmount_floppydrive.go index 07dff3b70..34f09aaa0 100644 --- a/builder/hyperv/common/step_unmount_floppydrive.go +++ b/builder/hyperv/common/step_unmount_floppydrive.go @@ -1,7 +1,9 @@ package common import ( + "context" "fmt" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" ) diff --git a/builder/hyperv/common/step_unmount_guest_additions.go b/builder/hyperv/common/step_unmount_guest_additions.go index 112c9c825..06600ddaa 100644 --- a/builder/hyperv/common/step_unmount_guest_additions.go +++ b/builder/hyperv/common/step_unmount_guest_additions.go @@ -1,7 +1,9 @@ package common import ( + "context" "fmt" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" ) diff --git a/builder/hyperv/common/step_unmount_secondary_dvd_images.go b/builder/hyperv/common/step_unmount_secondary_dvd_images.go index 3de0f7ac6..0f74d2789 100644 --- a/builder/hyperv/common/step_unmount_secondary_dvd_images.go +++ b/builder/hyperv/common/step_unmount_secondary_dvd_images.go @@ -1,7 +1,9 @@ package common import ( + "context" "fmt" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" ) diff --git a/builder/hyperv/common/step_wait_for_install_to_complete.go b/builder/hyperv/common/step_wait_for_install_to_complete.go index ee7d11beb..0a40730b3 100644 --- a/builder/hyperv/common/step_wait_for_install_to_complete.go +++ b/builder/hyperv/common/step_wait_for_install_to_complete.go @@ -1,10 +1,12 @@ package common import ( + "context" "fmt" + "time" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "time" ) const ( diff --git a/builder/hyperv/iso/builder_test.go b/builder/hyperv/iso/builder_test.go index 74c8de44e..fa164d85f 100644 --- a/builder/hyperv/iso/builder_test.go +++ b/builder/hyperv/iso/builder_test.go @@ -11,7 +11,6 @@ import ( hypervcommon "github.com/hashicorp/packer/builder/hyperv/common" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "os" ) func testConfig() map[string]interface{} { diff --git a/builder/hyperv/vmcx/builder_test.go b/builder/hyperv/vmcx/builder_test.go index 7792a365c..e428672c6 100644 --- a/builder/hyperv/vmcx/builder_test.go +++ b/builder/hyperv/vmcx/builder_test.go @@ -11,8 +11,6 @@ import ( hypervcommon "github.com/hashicorp/packer/builder/hyperv/common" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "io/ioutil" - "os" ) func testConfig() map[string]interface{} { diff --git a/builder/lxc/builder.go b/builder/lxc/builder.go index 82683b890..8c239cd9b 100644 --- a/builder/lxc/builder.go +++ b/builder/lxc/builder.go @@ -9,9 +9,6 @@ import ( "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" "github.com/hashicorp/packer/template/interpolate" - "log" - "os" - "path/filepath" ) // The unique ID for this builder diff --git a/builder/lxc/step_export.go b/builder/lxc/step_export.go index 2bafdeb41..f01b30074 100644 --- a/builder/lxc/step_export.go +++ b/builder/lxc/step_export.go @@ -2,9 +2,8 @@ package lxc import ( "bytes" + "context" "fmt" - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "io" "log" "os" @@ -12,8 +11,8 @@ import ( "path/filepath" "strings" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) type stepExport struct{} diff --git a/builder/lxc/step_lxc_create.go b/builder/lxc/step_lxc_create.go index 9efb7bc87..98dce3a7c 100644 --- a/builder/lxc/step_lxc_create.go +++ b/builder/lxc/step_lxc_create.go @@ -2,16 +2,15 @@ package lxc import ( "bytes" + "context" "fmt" - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "log" "os/exec" "path/filepath" "strings" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) type stepLxcCreate struct{} diff --git a/builder/lxc/step_prepare_output_dir.go b/builder/lxc/step_prepare_output_dir.go index 1dd082580..25479fd8a 100644 --- a/builder/lxc/step_prepare_output_dir.go +++ b/builder/lxc/step_prepare_output_dir.go @@ -1,14 +1,13 @@ package lxc import ( - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" + "context" "log" "os" "time" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) type stepPrepareOutputDir struct{} diff --git a/builder/lxc/step_provision.go b/builder/lxc/step_provision.go index 937435d85..ac33eb301 100644 --- a/builder/lxc/step_provision.go +++ b/builder/lxc/step_provision.go @@ -1,9 +1,11 @@ package lxc import ( + "context" + "log" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "log" ) // StepProvision provisions the instance within a chroot. diff --git a/builder/lxc/step_wait_init.go b/builder/lxc/step_wait_init.go index 19383fb62..4e055a690 100644 --- a/builder/lxc/step_wait_init.go +++ b/builder/lxc/step_wait_init.go @@ -1,16 +1,15 @@ package lxc import ( + "context" "errors" "fmt" - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "log" "strings" "time" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) type StepWaitInit struct { diff --git a/builder/lxd/builder.go b/builder/lxd/builder.go index d1b040853..290b8a631 100644 --- a/builder/lxd/builder.go +++ b/builder/lxd/builder.go @@ -7,7 +7,6 @@ import ( "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" "github.com/hashicorp/packer/template/interpolate" - "log" ) // The unique ID for this builder diff --git a/builder/lxd/step_lxd_launch.go b/builder/lxd/step_lxd_launch.go index f1a6f6b45..de34a5cb4 100644 --- a/builder/lxd/step_lxd_launch.go +++ b/builder/lxd/step_lxd_launch.go @@ -1,10 +1,12 @@ package lxd import ( + "context" "fmt" + "time" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "time" ) type stepLxdLaunch struct{} diff --git a/builder/lxd/step_provision.go b/builder/lxd/step_provision.go index dedd1a2ae..509006d77 100644 --- a/builder/lxd/step_provision.go +++ b/builder/lxd/step_provision.go @@ -1,9 +1,11 @@ package lxd import ( + "context" + "log" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "log" ) // StepProvision provisions the container diff --git a/builder/lxd/step_publish.go b/builder/lxd/step_publish.go index 4a6c206fe..4dc21880f 100644 --- a/builder/lxd/step_publish.go +++ b/builder/lxd/step_publish.go @@ -1,10 +1,12 @@ package lxd import ( + "context" "fmt" + "regexp" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "regexp" ) type stepPublish struct{} diff --git a/builder/oneandone/builder.go b/builder/oneandone/builder.go index 7b7be84aa..4b84b3938 100644 --- a/builder/oneandone/builder.go +++ b/builder/oneandone/builder.go @@ -9,7 +9,6 @@ import ( "github.com/hashicorp/packer/helper/communicator" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "log" ) const BuilderId = "packer.oneandone" diff --git a/builder/oneandone/step_create_server.go b/builder/oneandone/step_create_server.go index 8aa05fb48..cffd8c440 100644 --- a/builder/oneandone/step_create_server.go +++ b/builder/oneandone/step_create_server.go @@ -1,6 +1,7 @@ package oneandone import ( + "context" "fmt" "strings" "time" @@ -8,8 +9,6 @@ import ( "github.com/1and1/oneandone-cloudserver-sdk-go" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "strings" - "time" ) type stepCreateServer struct{} diff --git a/builder/oneandone/step_create_sshkey.go b/builder/oneandone/step_create_sshkey.go index 9a1a58528..a27561c1f 100644 --- a/builder/oneandone/step_create_sshkey.go +++ b/builder/oneandone/step_create_sshkey.go @@ -1,9 +1,12 @@ package oneandone import ( + "context" "crypto/x509" "encoding/pem" "fmt" + "io/ioutil" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" "golang.org/x/crypto/ssh" diff --git a/builder/oneandone/step_take_snapshot.go b/builder/oneandone/step_take_snapshot.go index cedfb604a..65a3f7156 100644 --- a/builder/oneandone/step_take_snapshot.go +++ b/builder/oneandone/step_take_snapshot.go @@ -1,6 +1,8 @@ package oneandone import ( + "context" + "github.com/1and1/oneandone-cloudserver-sdk-go" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" diff --git a/builder/openstack/step_add_image_members.go b/builder/openstack/step_add_image_members.go index eda4122ce..e23e54588 100644 --- a/builder/openstack/step_add_image_members.go +++ b/builder/openstack/step_add_image_members.go @@ -1,6 +1,7 @@ package openstack import ( + "context" "fmt" "github.com/gophercloud/gophercloud/openstack/imageservice/v2/members" diff --git a/builder/openstack/step_allocate_ip.go b/builder/openstack/step_allocate_ip.go index 15f214d17..fb53ce434 100644 --- a/builder/openstack/step_allocate_ip.go +++ b/builder/openstack/step_allocate_ip.go @@ -1,6 +1,7 @@ package openstack import ( + "context" "fmt" "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips" diff --git a/builder/openstack/step_create_image.go b/builder/openstack/step_create_image.go index 777a3cb6a..de8a6f4f6 100644 --- a/builder/openstack/step_create_image.go +++ b/builder/openstack/step_create_image.go @@ -1,6 +1,7 @@ package openstack import ( + "context" "fmt" "log" "time" diff --git a/builder/openstack/step_get_password.go b/builder/openstack/step_get_password.go index 95f52e194..4b962db4b 100644 --- a/builder/openstack/step_get_password.go +++ b/builder/openstack/step_get_password.go @@ -1,6 +1,7 @@ package openstack import ( + "context" "crypto/rsa" "fmt" "log" diff --git a/builder/openstack/step_key_pair.go b/builder/openstack/step_key_pair.go index fb46c1392..c4eba5804 100644 --- a/builder/openstack/step_key_pair.go +++ b/builder/openstack/step_key_pair.go @@ -1,6 +1,7 @@ package openstack import ( + "context" "fmt" "io/ioutil" "log" diff --git a/builder/openstack/step_load_extensions.go b/builder/openstack/step_load_extensions.go index a5ffe8145..b11cf5527 100644 --- a/builder/openstack/step_load_extensions.go +++ b/builder/openstack/step_load_extensions.go @@ -1,6 +1,7 @@ package openstack import ( + "context" "fmt" "log" diff --git a/builder/openstack/step_load_flavor.go b/builder/openstack/step_load_flavor.go index 00f1b7092..8c331aa6a 100644 --- a/builder/openstack/step_load_flavor.go +++ b/builder/openstack/step_load_flavor.go @@ -1,6 +1,7 @@ package openstack import ( + "context" "fmt" "log" diff --git a/builder/openstack/step_run_source_server.go b/builder/openstack/step_run_source_server.go index ebbc45773..bb09f85b7 100644 --- a/builder/openstack/step_run_source_server.go +++ b/builder/openstack/step_run_source_server.go @@ -1,6 +1,7 @@ package openstack import ( + "context" "fmt" "io/ioutil" "log" diff --git a/builder/openstack/step_stop_server.go b/builder/openstack/step_stop_server.go index bc651b7ce..1c864eef0 100644 --- a/builder/openstack/step_stop_server.go +++ b/builder/openstack/step_stop_server.go @@ -1,6 +1,7 @@ package openstack import ( + "context" "fmt" "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/startstop" diff --git a/builder/openstack/step_update_image_visibility.go b/builder/openstack/step_update_image_visibility.go index bd814638b..8d9a3bc7c 100644 --- a/builder/openstack/step_update_image_visibility.go +++ b/builder/openstack/step_update_image_visibility.go @@ -1,6 +1,7 @@ package openstack import ( + "context" "fmt" imageservice "github.com/gophercloud/gophercloud/openstack/imageservice/v2/images" diff --git a/builder/openstack/step_wait_for_rackconnect.go b/builder/openstack/step_wait_for_rackconnect.go index f214e0894..6cbe2ed0e 100644 --- a/builder/openstack/step_wait_for_rackconnect.go +++ b/builder/openstack/step_wait_for_rackconnect.go @@ -1,6 +1,7 @@ package openstack import ( + "context" "fmt" "time" diff --git a/builder/oracle/oci/step_create_instance.go b/builder/oracle/oci/step_create_instance.go index cb1ce6642..375b92b1b 100644 --- a/builder/oracle/oci/step_create_instance.go +++ b/builder/oracle/oci/step_create_instance.go @@ -1,6 +1,7 @@ package oci import ( + "context" "fmt" "github.com/hashicorp/packer/helper/multistep" diff --git a/builder/oracle/oci/step_image.go b/builder/oracle/oci/step_image.go index 46c7ed8ba..ff767f709 100644 --- a/builder/oracle/oci/step_image.go +++ b/builder/oracle/oci/step_image.go @@ -1,6 +1,7 @@ package oci import ( + "context" "fmt" "github.com/hashicorp/packer/helper/multistep" diff --git a/builder/oracle/oci/step_instance_info.go b/builder/oracle/oci/step_instance_info.go index 9b79529cc..d3e024978 100644 --- a/builder/oracle/oci/step_instance_info.go +++ b/builder/oracle/oci/step_instance_info.go @@ -1,6 +1,7 @@ package oci import ( + "context" "fmt" "github.com/hashicorp/packer/helper/multistep" diff --git a/builder/oracle/oci/step_ssh_key_pair.go b/builder/oracle/oci/step_ssh_key_pair.go index c9e80e54b..9fa83c17d 100644 --- a/builder/oracle/oci/step_ssh_key_pair.go +++ b/builder/oracle/oci/step_ssh_key_pair.go @@ -1,6 +1,7 @@ package oci import ( + "context" "crypto/rand" "crypto/rsa" "crypto/x509" diff --git a/builder/parallels/common/step_attach_floppy.go b/builder/parallels/common/step_attach_floppy.go index bd8116597..fa9566011 100644 --- a/builder/parallels/common/step_attach_floppy.go +++ b/builder/parallels/common/step_attach_floppy.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" diff --git a/builder/parallels/common/step_attach_parallels_tools.go b/builder/parallels/common/step_attach_parallels_tools.go index 645cec0d7..1c1ea31b4 100644 --- a/builder/parallels/common/step_attach_parallels_tools.go +++ b/builder/parallels/common/step_attach_parallels_tools.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" diff --git a/builder/parallels/common/step_compact_disk.go b/builder/parallels/common/step_compact_disk.go index 90f05b7f9..85688de51 100644 --- a/builder/parallels/common/step_compact_disk.go +++ b/builder/parallels/common/step_compact_disk.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "github.com/hashicorp/packer/helper/multistep" diff --git a/builder/parallels/common/step_output_dir.go b/builder/parallels/common/step_output_dir.go index c94ab3928..f6f092c4a 100644 --- a/builder/parallels/common/step_output_dir.go +++ b/builder/parallels/common/step_output_dir.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "os" diff --git a/builder/parallels/common/step_prepare_parallels_tools.go b/builder/parallels/common/step_prepare_parallels_tools.go index c64fd395b..5da892782 100644 --- a/builder/parallels/common/step_prepare_parallels_tools.go +++ b/builder/parallels/common/step_prepare_parallels_tools.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "os" diff --git a/builder/parallels/common/step_prlctl.go b/builder/parallels/common/step_prlctl.go index eea179a70..9ae6ec7e9 100644 --- a/builder/parallels/common/step_prlctl.go +++ b/builder/parallels/common/step_prlctl.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "strings" diff --git a/builder/parallels/common/step_run.go b/builder/parallels/common/step_run.go index b37e536d5..073ad0550 100644 --- a/builder/parallels/common/step_run.go +++ b/builder/parallels/common/step_run.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "time" diff --git a/builder/parallels/common/step_shutdown.go b/builder/parallels/common/step_shutdown.go index 10a4c5a3f..7f9d3b663 100644 --- a/builder/parallels/common/step_shutdown.go +++ b/builder/parallels/common/step_shutdown.go @@ -2,6 +2,7 @@ package common import ( "bytes" + "context" "errors" "fmt" "log" diff --git a/builder/parallels/common/step_type_boot_command.go b/builder/parallels/common/step_type_boot_command.go index bd6adbfd8..e39a90b6c 100644 --- a/builder/parallels/common/step_type_boot_command.go +++ b/builder/parallels/common/step_type_boot_command.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "strings" diff --git a/builder/parallels/common/step_upload_parallels_tools.go b/builder/parallels/common/step_upload_parallels_tools.go index 86bd5171b..0da0b26e0 100644 --- a/builder/parallels/common/step_upload_parallels_tools.go +++ b/builder/parallels/common/step_upload_parallels_tools.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "os" diff --git a/builder/parallels/common/step_upload_version.go b/builder/parallels/common/step_upload_version.go index 982f38f9f..1a1bfcf0c 100644 --- a/builder/parallels/common/step_upload_version.go +++ b/builder/parallels/common/step_upload_version.go @@ -2,6 +2,7 @@ package common import ( "bytes" + "context" "fmt" "log" diff --git a/builder/parallels/iso/step_attach_iso.go b/builder/parallels/iso/step_attach_iso.go index bfb7bacf9..a4cf634a8 100644 --- a/builder/parallels/iso/step_attach_iso.go +++ b/builder/parallels/iso/step_attach_iso.go @@ -1,6 +1,7 @@ package iso import ( + "context" "fmt" "log" diff --git a/builder/parallels/iso/step_create_disk.go b/builder/parallels/iso/step_create_disk.go index d98f8c5b4..42640f5a8 100644 --- a/builder/parallels/iso/step_create_disk.go +++ b/builder/parallels/iso/step_create_disk.go @@ -1,6 +1,7 @@ package iso import ( + "context" "fmt" "strconv" diff --git a/builder/parallels/iso/step_create_vm.go b/builder/parallels/iso/step_create_vm.go index 255bafaaa..8a4e22517 100644 --- a/builder/parallels/iso/step_create_vm.go +++ b/builder/parallels/iso/step_create_vm.go @@ -1,6 +1,7 @@ package iso import ( + "context" "fmt" parallelscommon "github.com/hashicorp/packer/builder/parallels/common" diff --git a/builder/parallels/iso/step_set_boot_order.go b/builder/parallels/iso/step_set_boot_order.go index 5b44d98af..cfcda6080 100644 --- a/builder/parallels/iso/step_set_boot_order.go +++ b/builder/parallels/iso/step_set_boot_order.go @@ -1,6 +1,7 @@ package iso import ( + "context" "fmt" parallelscommon "github.com/hashicorp/packer/builder/parallels/common" diff --git a/builder/parallels/pvm/step_import.go b/builder/parallels/pvm/step_import.go index c8b97dd54..0907c6b44 100644 --- a/builder/parallels/pvm/step_import.go +++ b/builder/parallels/pvm/step_import.go @@ -1,6 +1,7 @@ package pvm import ( + "context" "fmt" parallelscommon "github.com/hashicorp/packer/builder/parallels/common" diff --git a/builder/profitbricks/builder.go b/builder/profitbricks/builder.go index fc7734a07..6a1428075 100644 --- a/builder/profitbricks/builder.go +++ b/builder/profitbricks/builder.go @@ -8,7 +8,6 @@ import ( "github.com/hashicorp/packer/helper/communicator" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "log" ) const BuilderId = "packer.profitbricks" diff --git a/builder/profitbricks/step_create_server.go b/builder/profitbricks/step_create_server.go index 926864118..00742762a 100644 --- a/builder/profitbricks/step_create_server.go +++ b/builder/profitbricks/step_create_server.go @@ -1,6 +1,7 @@ package profitbricks import ( + "context" "encoding/json" "errors" "fmt" diff --git a/builder/profitbricks/step_create_ssh_key.go b/builder/profitbricks/step_create_ssh_key.go index 4c1a75d18..be0b973a8 100644 --- a/builder/profitbricks/step_create_ssh_key.go +++ b/builder/profitbricks/step_create_ssh_key.go @@ -1,9 +1,12 @@ package profitbricks import ( + "context" "crypto/x509" "encoding/pem" "fmt" + "io/ioutil" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" "golang.org/x/crypto/ssh" diff --git a/builder/profitbricks/step_take_snapshot.go b/builder/profitbricks/step_take_snapshot.go index 8cbc208b8..a3bfe2d7d 100644 --- a/builder/profitbricks/step_take_snapshot.go +++ b/builder/profitbricks/step_take_snapshot.go @@ -1,6 +1,7 @@ package profitbricks import ( + "context" "encoding/json" "time" diff --git a/builder/qemu/step_boot_wait.go b/builder/qemu/step_boot_wait.go index fe7025b84..0c3935004 100644 --- a/builder/qemu/step_boot_wait.go +++ b/builder/qemu/step_boot_wait.go @@ -1,10 +1,12 @@ package qemu import ( + "context" "fmt" + "time" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "time" ) // stepBootWait waits the configured time period. diff --git a/builder/qemu/step_configure_vnc.go b/builder/qemu/step_configure_vnc.go index 5d412b811..1f1cd088d 100644 --- a/builder/qemu/step_configure_vnc.go +++ b/builder/qemu/step_configure_vnc.go @@ -1,6 +1,7 @@ package qemu import ( + "context" "fmt" "log" "math/rand" diff --git a/builder/qemu/step_convert_disk.go b/builder/qemu/step_convert_disk.go index 209361f5d..bc5c3f3b1 100644 --- a/builder/qemu/step_convert_disk.go +++ b/builder/qemu/step_convert_disk.go @@ -1,6 +1,7 @@ package qemu import ( + "context" "fmt" "path/filepath" diff --git a/builder/qemu/step_copy_disk.go b/builder/qemu/step_copy_disk.go index a6a2e8ca1..51ca47a1d 100644 --- a/builder/qemu/step_copy_disk.go +++ b/builder/qemu/step_copy_disk.go @@ -1,6 +1,7 @@ package qemu import ( + "context" "fmt" "path/filepath" diff --git a/builder/qemu/step_create_disk.go b/builder/qemu/step_create_disk.go index 05b5d0833..4472903f1 100644 --- a/builder/qemu/step_create_disk.go +++ b/builder/qemu/step_create_disk.go @@ -1,6 +1,7 @@ package qemu import ( + "context" "fmt" "path/filepath" diff --git a/builder/qemu/step_forward_ssh.go b/builder/qemu/step_forward_ssh.go index 296c94d19..6e9efaca1 100644 --- a/builder/qemu/step_forward_ssh.go +++ b/builder/qemu/step_forward_ssh.go @@ -1,6 +1,7 @@ package qemu import ( + "context" "fmt" "log" "math/rand" diff --git a/builder/qemu/step_prepare_output_dir.go b/builder/qemu/step_prepare_output_dir.go index f24138c4c..8eeebb4e1 100644 --- a/builder/qemu/step_prepare_output_dir.go +++ b/builder/qemu/step_prepare_output_dir.go @@ -1,14 +1,13 @@ package qemu import ( - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" + "context" "log" "os" "time" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) type stepPrepareOutputDir struct{} diff --git a/builder/qemu/step_resize_disk.go b/builder/qemu/step_resize_disk.go index 63b430187..8ffab5931 100644 --- a/builder/qemu/step_resize_disk.go +++ b/builder/qemu/step_resize_disk.go @@ -1,6 +1,7 @@ package qemu import ( + "context" "fmt" "path/filepath" diff --git a/builder/qemu/step_run.go b/builder/qemu/step_run.go index 463c8bf07..c524d5514 100644 --- a/builder/qemu/step_run.go +++ b/builder/qemu/step_run.go @@ -1,6 +1,7 @@ package qemu import ( + "context" "fmt" "log" "path/filepath" diff --git a/builder/qemu/step_set_iso.go b/builder/qemu/step_set_iso.go index e17bbd254..dba34777f 100644 --- a/builder/qemu/step_set_iso.go +++ b/builder/qemu/step_set_iso.go @@ -1,6 +1,7 @@ package qemu import ( + "context" "fmt" "net/http" diff --git a/builder/qemu/step_shutdown.go b/builder/qemu/step_shutdown.go index 394fc16fa..9c5f89f6c 100644 --- a/builder/qemu/step_shutdown.go +++ b/builder/qemu/step_shutdown.go @@ -1,6 +1,7 @@ package qemu import ( + "context" "errors" "fmt" "log" diff --git a/builder/qemu/step_type_boot_command.go b/builder/qemu/step_type_boot_command.go index dbc896a48..f1dc895e9 100644 --- a/builder/qemu/step_type_boot_command.go +++ b/builder/qemu/step_type_boot_command.go @@ -1,6 +1,7 @@ package qemu import ( + "context" "fmt" "log" "net" @@ -17,7 +18,6 @@ import ( "github.com/hashicorp/packer/packer" "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/go-vnc" - "os" ) const KeyLeftShift uint32 = 0xFFE1 diff --git a/builder/triton/step_create_image_from_machine.go b/builder/triton/step_create_image_from_machine.go index df83e5205..425a6690b 100644 --- a/builder/triton/step_create_image_from_machine.go +++ b/builder/triton/step_create_image_from_machine.go @@ -1,6 +1,7 @@ package triton import ( + "context" "fmt" "time" diff --git a/builder/triton/step_create_source_machine.go b/builder/triton/step_create_source_machine.go index bca123508..c3097fae2 100644 --- a/builder/triton/step_create_source_machine.go +++ b/builder/triton/step_create_source_machine.go @@ -1,6 +1,7 @@ package triton import ( + "context" "fmt" "time" diff --git a/builder/triton/step_delete_machine.go b/builder/triton/step_delete_machine.go index 28d27f268..8f9e1bc1f 100644 --- a/builder/triton/step_delete_machine.go +++ b/builder/triton/step_delete_machine.go @@ -1,6 +1,7 @@ package triton import ( + "context" "fmt" "time" diff --git a/builder/triton/step_stop_machine.go b/builder/triton/step_stop_machine.go index 6c01805a5..73fa3f4d6 100644 --- a/builder/triton/step_stop_machine.go +++ b/builder/triton/step_stop_machine.go @@ -1,6 +1,7 @@ package triton import ( + "context" "fmt" "time" diff --git a/builder/triton/step_test.go b/builder/triton/step_test.go index 00fef044a..bccc398c7 100644 --- a/builder/triton/step_test.go +++ b/builder/triton/step_test.go @@ -2,9 +2,10 @@ package triton import ( "bytes" + "testing" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "testing" ) func testState(t *testing.T) multistep.StateBag { diff --git a/builder/triton/step_wait_for_stop_to_not_fail.go b/builder/triton/step_wait_for_stop_to_not_fail.go index ff777d890..de0a7cc84 100644 --- a/builder/triton/step_wait_for_stop_to_not_fail.go +++ b/builder/triton/step_wait_for_stop_to_not_fail.go @@ -1,6 +1,7 @@ package triton import ( + "context" "time" "github.com/hashicorp/packer/helper/multistep" diff --git a/builder/virtualbox/common/step_attach_floppy.go b/builder/virtualbox/common/step_attach_floppy.go index f8c20f3f5..6c73aa4b4 100644 --- a/builder/virtualbox/common/step_attach_floppy.go +++ b/builder/virtualbox/common/step_attach_floppy.go @@ -1,17 +1,16 @@ package common import ( + "context" "fmt" - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "io" "io/ioutil" "log" "os" "path/filepath" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) // This step attaches the ISO to the virtual machine. diff --git a/builder/virtualbox/common/step_attach_floppy_test.go b/builder/virtualbox/common/step_attach_floppy_test.go index 85f8ca0c2..9dba8adf1 100644 --- a/builder/virtualbox/common/step_attach_floppy_test.go +++ b/builder/virtualbox/common/step_attach_floppy_test.go @@ -1,12 +1,11 @@ package common import ( - "github.com/hashicorp/packer/helper/multistep" "io/ioutil" "os" "testing" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func TestStepAttachFloppy_impl(t *testing.T) { diff --git a/builder/virtualbox/common/step_attach_guest_additions.go b/builder/virtualbox/common/step_attach_guest_additions.go index c6b88d1c8..d5698c372 100644 --- a/builder/virtualbox/common/step_attach_guest_additions.go +++ b/builder/virtualbox/common/step_attach_guest_additions.go @@ -1,10 +1,12 @@ package common import ( + "context" "fmt" + "log" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "log" ) // This step attaches the VirtualBox guest additions as a inserted CD onto diff --git a/builder/virtualbox/common/step_configure_vrdp.go b/builder/virtualbox/common/step_configure_vrdp.go index 2cf2659d8..6cc960ad3 100644 --- a/builder/virtualbox/common/step_configure_vrdp.go +++ b/builder/virtualbox/common/step_configure_vrdp.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "math/rand" diff --git a/builder/virtualbox/common/step_download_guest_additions.go b/builder/virtualbox/common/step_download_guest_additions.go index 750f825e5..1aebca144 100644 --- a/builder/virtualbox/common/step_download_guest_additions.go +++ b/builder/virtualbox/common/step_download_guest_additions.go @@ -2,6 +2,7 @@ package common import ( "bytes" + "context" "fmt" "io" "io/ioutil" diff --git a/builder/virtualbox/common/step_export.go b/builder/virtualbox/common/step_export.go index a09b5c01c..03b02e8e4 100644 --- a/builder/virtualbox/common/step_export.go +++ b/builder/virtualbox/common/step_export.go @@ -1,16 +1,15 @@ package common import ( + "context" "fmt" - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "log" "path/filepath" "strings" "time" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) // This step cleans up forwarded ports and exports the VM to an OVF. diff --git a/builder/virtualbox/common/step_export_test.go b/builder/virtualbox/common/step_export_test.go index fee2cafdb..1bea8df57 100644 --- a/builder/virtualbox/common/step_export_test.go +++ b/builder/virtualbox/common/step_export_test.go @@ -1,10 +1,9 @@ package common import ( - "github.com/hashicorp/packer/helper/multistep" "testing" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func TestStepExport_impl(t *testing.T) { diff --git a/builder/virtualbox/common/step_forward_ssh.go b/builder/virtualbox/common/step_forward_ssh.go index 4bcd2dc66..b4e3b2f25 100644 --- a/builder/virtualbox/common/step_forward_ssh.go +++ b/builder/virtualbox/common/step_forward_ssh.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "math/rand" diff --git a/builder/virtualbox/common/step_output_dir.go b/builder/virtualbox/common/step_output_dir.go index cad96b98e..fc39d08b2 100644 --- a/builder/virtualbox/common/step_output_dir.go +++ b/builder/virtualbox/common/step_output_dir.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "os" diff --git a/builder/virtualbox/common/step_output_dir_test.go b/builder/virtualbox/common/step_output_dir_test.go index 48f4634f4..5066e0e56 100644 --- a/builder/virtualbox/common/step_output_dir_test.go +++ b/builder/virtualbox/common/step_output_dir_test.go @@ -1,12 +1,11 @@ package common import ( - "github.com/hashicorp/packer/helper/multistep" "io/ioutil" "os" "testing" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func testStepOutputDir(t *testing.T) *StepOutputDir { diff --git a/builder/virtualbox/common/step_remove_devices.go b/builder/virtualbox/common/step_remove_devices.go index 4a4a24a9e..835fd5af8 100644 --- a/builder/virtualbox/common/step_remove_devices.go +++ b/builder/virtualbox/common/step_remove_devices.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" diff --git a/builder/virtualbox/common/step_remove_devices_test.go b/builder/virtualbox/common/step_remove_devices_test.go index 9a2e8ee3a..0d9f6bbe9 100644 --- a/builder/virtualbox/common/step_remove_devices_test.go +++ b/builder/virtualbox/common/step_remove_devices_test.go @@ -1,10 +1,9 @@ package common import ( - "github.com/hashicorp/packer/helper/multistep" "testing" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func TestStepRemoveDevices_impl(t *testing.T) { diff --git a/builder/virtualbox/common/step_run.go b/builder/virtualbox/common/step_run.go index 391d8c25e..62d98d894 100644 --- a/builder/virtualbox/common/step_run.go +++ b/builder/virtualbox/common/step_run.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "time" diff --git a/builder/virtualbox/common/step_shutdown.go b/builder/virtualbox/common/step_shutdown.go index 7acf97683..af2539cac 100644 --- a/builder/virtualbox/common/step_shutdown.go +++ b/builder/virtualbox/common/step_shutdown.go @@ -1,15 +1,14 @@ package common import ( + "context" "errors" "fmt" - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "log" "time" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) // This step shuts down the machine. It first attempts to do so gracefully, diff --git a/builder/virtualbox/common/step_shutdown_test.go b/builder/virtualbox/common/step_shutdown_test.go index aa36a6c91..d38b3378c 100644 --- a/builder/virtualbox/common/step_shutdown_test.go +++ b/builder/virtualbox/common/step_shutdown_test.go @@ -1,13 +1,11 @@ package common import ( - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "testing" "time" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) func TestStepShutdown_impl(t *testing.T) { diff --git a/builder/virtualbox/common/step_suppress_messages.go b/builder/virtualbox/common/step_suppress_messages.go index 1805a0535..369911bdb 100644 --- a/builder/virtualbox/common/step_suppress_messages.go +++ b/builder/virtualbox/common/step_suppress_messages.go @@ -1,10 +1,12 @@ package common import ( + "context" "fmt" + "log" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "log" ) // This step sets some variables in VirtualBox so that annoying diff --git a/builder/virtualbox/common/step_suppress_messages_test.go b/builder/virtualbox/common/step_suppress_messages_test.go index d5609d456..ad3a59fd7 100644 --- a/builder/virtualbox/common/step_suppress_messages_test.go +++ b/builder/virtualbox/common/step_suppress_messages_test.go @@ -2,10 +2,9 @@ package common import ( "errors" - "github.com/hashicorp/packer/helper/multistep" "testing" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func TestStepSuppressMessages_impl(t *testing.T) { diff --git a/builder/virtualbox/common/step_test.go b/builder/virtualbox/common/step_test.go index ec0854415..c8a12abb6 100644 --- a/builder/virtualbox/common/step_test.go +++ b/builder/virtualbox/common/step_test.go @@ -2,9 +2,10 @@ package common import ( "bytes" + "testing" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "testing" ) func testState(t *testing.T) multistep.StateBag { diff --git a/builder/virtualbox/common/step_type_boot_command.go b/builder/virtualbox/common/step_type_boot_command.go index 997805732..cb5b43648 100644 --- a/builder/virtualbox/common/step_type_boot_command.go +++ b/builder/virtualbox/common/step_type_boot_command.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "strings" diff --git a/builder/virtualbox/common/step_upload_guest_additions.go b/builder/virtualbox/common/step_upload_guest_additions.go index 6de891ffd..c77ef7d22 100644 --- a/builder/virtualbox/common/step_upload_guest_additions.go +++ b/builder/virtualbox/common/step_upload_guest_additions.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "os" diff --git a/builder/virtualbox/common/step_upload_version.go b/builder/virtualbox/common/step_upload_version.go index fa154c7ae..deaf8824d 100644 --- a/builder/virtualbox/common/step_upload_version.go +++ b/builder/virtualbox/common/step_upload_version.go @@ -2,10 +2,12 @@ package common import ( "bytes" + "context" "fmt" + "log" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "log" ) // This step uploads a file containing the VirtualBox version, which diff --git a/builder/virtualbox/common/step_upload_version_test.go b/builder/virtualbox/common/step_upload_version_test.go index cfd940a4b..17609b9aa 100644 --- a/builder/virtualbox/common/step_upload_version_test.go +++ b/builder/virtualbox/common/step_upload_version_test.go @@ -1,9 +1,10 @@ package common import ( + "testing" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "testing" ) func TestStepUploadVersion_impl(t *testing.T) { diff --git a/builder/virtualbox/common/step_vboxmanage.go b/builder/virtualbox/common/step_vboxmanage.go index 54ef96e0f..948cae884 100644 --- a/builder/virtualbox/common/step_vboxmanage.go +++ b/builder/virtualbox/common/step_vboxmanage.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "strings" diff --git a/builder/virtualbox/iso/step_attach_iso.go b/builder/virtualbox/iso/step_attach_iso.go index 3c9fcc55e..619d61afd 100644 --- a/builder/virtualbox/iso/step_attach_iso.go +++ b/builder/virtualbox/iso/step_attach_iso.go @@ -1,6 +1,7 @@ package iso import ( + "context" "fmt" vboxcommon "github.com/hashicorp/packer/builder/virtualbox/common" diff --git a/builder/virtualbox/iso/step_create_disk.go b/builder/virtualbox/iso/step_create_disk.go index cb67af807..7c5b03e4f 100644 --- a/builder/virtualbox/iso/step_create_disk.go +++ b/builder/virtualbox/iso/step_create_disk.go @@ -1,6 +1,7 @@ package iso import ( + "context" "fmt" vboxcommon "github.com/hashicorp/packer/builder/virtualbox/common" diff --git a/builder/virtualbox/iso/step_create_vm.go b/builder/virtualbox/iso/step_create_vm.go index 81a8a0304..72a556737 100644 --- a/builder/virtualbox/iso/step_create_vm.go +++ b/builder/virtualbox/iso/step_create_vm.go @@ -1,6 +1,7 @@ package iso import ( + "context" "fmt" vboxcommon "github.com/hashicorp/packer/builder/virtualbox/common" diff --git a/builder/virtualbox/ovf/step_import.go b/builder/virtualbox/ovf/step_import.go index 8ebf5fe4b..5e066d83a 100644 --- a/builder/virtualbox/ovf/step_import.go +++ b/builder/virtualbox/ovf/step_import.go @@ -1,6 +1,7 @@ package ovf import ( + "context" "fmt" vboxcommon "github.com/hashicorp/packer/builder/virtualbox/common" diff --git a/builder/virtualbox/ovf/step_import_test.go b/builder/virtualbox/ovf/step_import_test.go index aec090980..45054585c 100644 --- a/builder/virtualbox/ovf/step_import_test.go +++ b/builder/virtualbox/ovf/step_import_test.go @@ -5,7 +5,6 @@ import ( vboxcommon "github.com/hashicorp/packer/builder/virtualbox/common" "github.com/hashicorp/packer/helper/multistep" - "testing" ) func TestStepImport_impl(t *testing.T) { diff --git a/builder/virtualbox/ovf/step_test.go b/builder/virtualbox/ovf/step_test.go index eb6522ef6..4f9a0f9d8 100644 --- a/builder/virtualbox/ovf/step_test.go +++ b/builder/virtualbox/ovf/step_test.go @@ -7,7 +7,6 @@ import ( vboxcommon "github.com/hashicorp/packer/builder/virtualbox/common" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "testing" ) func testState(t *testing.T) multistep.StateBag { diff --git a/builder/vmware/common/step_clean_files.go b/builder/vmware/common/step_clean_files.go index 676e08f2f..08d14cf63 100644 --- a/builder/vmware/common/step_clean_files.go +++ b/builder/vmware/common/step_clean_files.go @@ -1,14 +1,13 @@ package common import ( + "context" "fmt" - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "os" "path/filepath" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) // These are the extensions of files that are important for the function diff --git a/builder/vmware/common/step_clean_vmx.go b/builder/vmware/common/step_clean_vmx.go index 12cc6b223..f112227f8 100644 --- a/builder/vmware/common/step_clean_vmx.go +++ b/builder/vmware/common/step_clean_vmx.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "regexp" diff --git a/builder/vmware/common/step_compact_disk.go b/builder/vmware/common/step_compact_disk.go index cf0c4cf19..e7823e3ba 100644 --- a/builder/vmware/common/step_compact_disk.go +++ b/builder/vmware/common/step_compact_disk.go @@ -1,10 +1,12 @@ package common import ( + "context" "fmt" + "log" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "log" ) // This step compacts the virtual disk for the VM unless the "skip_compaction" diff --git a/builder/vmware/common/step_configure_vmx.go b/builder/vmware/common/step_configure_vmx.go index 369712b6e..155234ac4 100644 --- a/builder/vmware/common/step_configure_vmx.go +++ b/builder/vmware/common/step_configure_vmx.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "io/ioutil" "log" diff --git a/builder/vmware/common/step_configure_vnc.go b/builder/vmware/common/step_configure_vnc.go index 1f18ce5bf..90aa4a998 100644 --- a/builder/vmware/common/step_configure_vnc.go +++ b/builder/vmware/common/step_configure_vnc.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "io/ioutil" "log" diff --git a/builder/vmware/common/step_output_dir.go b/builder/vmware/common/step_output_dir.go index 35effe138..90c71e18a 100644 --- a/builder/vmware/common/step_output_dir.go +++ b/builder/vmware/common/step_output_dir.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "time" diff --git a/builder/vmware/common/step_output_dir_test.go b/builder/vmware/common/step_output_dir_test.go index cdfba2a2e..dd1326387 100644 --- a/builder/vmware/common/step_output_dir_test.go +++ b/builder/vmware/common/step_output_dir_test.go @@ -1,12 +1,11 @@ package common import ( - "github.com/hashicorp/packer/helper/multistep" "io/ioutil" "os" "testing" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func testOutputDir(t *testing.T) *LocalOutputDir { diff --git a/builder/vmware/common/step_prepare_tools.go b/builder/vmware/common/step_prepare_tools.go index 3ce771387..72f8f1488 100644 --- a/builder/vmware/common/step_prepare_tools.go +++ b/builder/vmware/common/step_prepare_tools.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "os" diff --git a/builder/vmware/common/step_run.go b/builder/vmware/common/step_run.go index 14334e779..f85d5948f 100644 --- a/builder/vmware/common/step_run.go +++ b/builder/vmware/common/step_run.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "time" diff --git a/builder/vmware/common/step_run_test.go b/builder/vmware/common/step_run_test.go index 395575231..b884351dd 100644 --- a/builder/vmware/common/step_run_test.go +++ b/builder/vmware/common/step_run_test.go @@ -1,6 +1,7 @@ package common import ( + "context" "testing" "github.com/hashicorp/packer/helper/multistep" diff --git a/builder/vmware/common/step_shutdown.go b/builder/vmware/common/step_shutdown.go index 5067ebbb2..bc8490ff3 100644 --- a/builder/vmware/common/step_shutdown.go +++ b/builder/vmware/common/step_shutdown.go @@ -2,17 +2,16 @@ package common import ( "bytes" + "context" "errors" "fmt" - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "log" "regexp" "strings" "time" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) // This step shuts down the machine. It first attempts to do so gracefully, diff --git a/builder/vmware/common/step_suppress_messages.go b/builder/vmware/common/step_suppress_messages.go index 3e8721dec..02928123a 100644 --- a/builder/vmware/common/step_suppress_messages.go +++ b/builder/vmware/common/step_suppress_messages.go @@ -1,10 +1,12 @@ package common import ( + "context" "fmt" + "log" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "log" ) // This step suppresses any messages that VMware product might show. diff --git a/builder/vmware/common/step_test.go b/builder/vmware/common/step_test.go index ec0854415..c8a12abb6 100644 --- a/builder/vmware/common/step_test.go +++ b/builder/vmware/common/step_test.go @@ -2,9 +2,10 @@ package common import ( "bytes" + "testing" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "testing" ) func testState(t *testing.T) multistep.StateBag { diff --git a/builder/vmware/common/step_type_boot_command.go b/builder/vmware/common/step_type_boot_command.go index 8e6a66366..05c66de16 100644 --- a/builder/vmware/common/step_type_boot_command.go +++ b/builder/vmware/common/step_type_boot_command.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "log" "net" diff --git a/builder/vmware/common/step_upload_tools.go b/builder/vmware/common/step_upload_tools.go index 4dff6496e..eed55ab0b 100644 --- a/builder/vmware/common/step_upload_tools.go +++ b/builder/vmware/common/step_upload_tools.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "os" diff --git a/builder/vmware/iso/step_create_disk.go b/builder/vmware/iso/step_create_disk.go index 457236034..ddee55c7f 100644 --- a/builder/vmware/iso/step_create_disk.go +++ b/builder/vmware/iso/step_create_disk.go @@ -1,13 +1,13 @@ package iso import ( + "context" "fmt" "path/filepath" vmwcommon "github.com/hashicorp/packer/builder/vmware/common" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "path/filepath" ) // This step creates the virtual disks for the VM. diff --git a/builder/vmware/iso/step_create_vmx.go b/builder/vmware/iso/step_create_vmx.go index a071ed0f1..029f2a31e 100644 --- a/builder/vmware/iso/step_create_vmx.go +++ b/builder/vmware/iso/step_create_vmx.go @@ -1,6 +1,7 @@ package iso import ( + "context" "fmt" "io/ioutil" "os" diff --git a/builder/vmware/iso/step_export.go b/builder/vmware/iso/step_export.go index 4d08af159..4f6df9ed4 100644 --- a/builder/vmware/iso/step_export.go +++ b/builder/vmware/iso/step_export.go @@ -2,6 +2,7 @@ package iso import ( "bytes" + "context" "fmt" "net/url" "os" diff --git a/builder/vmware/iso/step_export_test.go b/builder/vmware/iso/step_export_test.go index a713620e6..c41b2550b 100644 --- a/builder/vmware/iso/step_export_test.go +++ b/builder/vmware/iso/step_export_test.go @@ -1,10 +1,9 @@ package iso import ( - "github.com/hashicorp/packer/helper/multistep" "testing" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func TestStepExport_impl(t *testing.T) { diff --git a/builder/vmware/iso/step_register.go b/builder/vmware/iso/step_register.go index e1d396ab1..c97800910 100644 --- a/builder/vmware/iso/step_register.go +++ b/builder/vmware/iso/step_register.go @@ -1,6 +1,7 @@ package iso import ( + "context" "fmt" "time" diff --git a/builder/vmware/iso/step_register_test.go b/builder/vmware/iso/step_register_test.go index 6199696f0..0d2aaaa97 100644 --- a/builder/vmware/iso/step_register_test.go +++ b/builder/vmware/iso/step_register_test.go @@ -1,10 +1,9 @@ package iso import ( - "github.com/hashicorp/packer/helper/multistep" "testing" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func TestStepRegister_impl(t *testing.T) { diff --git a/builder/vmware/iso/step_remote_upload.go b/builder/vmware/iso/step_remote_upload.go index 427ba28c6..c4dfda8e5 100644 --- a/builder/vmware/iso/step_remote_upload.go +++ b/builder/vmware/iso/step_remote_upload.go @@ -1,13 +1,13 @@ package iso import ( + "context" "fmt" "log" vmwcommon "github.com/hashicorp/packer/builder/vmware/common" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "log" ) // stepRemoteUpload uploads some thing from the state bag to a remote driver diff --git a/builder/vmware/iso/step_test.go b/builder/vmware/iso/step_test.go index 66fc38d36..958ab4734 100644 --- a/builder/vmware/iso/step_test.go +++ b/builder/vmware/iso/step_test.go @@ -7,7 +7,6 @@ import ( vmwcommon "github.com/hashicorp/packer/builder/vmware/common" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "testing" ) func testState(t *testing.T) multistep.StateBag { diff --git a/builder/vmware/iso/step_upload_vmx.go b/builder/vmware/iso/step_upload_vmx.go index 360372765..f0fec436c 100644 --- a/builder/vmware/iso/step_upload_vmx.go +++ b/builder/vmware/iso/step_upload_vmx.go @@ -1,13 +1,13 @@ package iso import ( + "context" "fmt" "path/filepath" vmwcommon "github.com/hashicorp/packer/builder/vmware/common" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "path/filepath" ) // This step upload the VMX to the remote host diff --git a/builder/vmware/vmx/step_clone_vmx.go b/builder/vmware/vmx/step_clone_vmx.go index e65ea0dca..f7874067c 100644 --- a/builder/vmware/vmx/step_clone_vmx.go +++ b/builder/vmware/vmx/step_clone_vmx.go @@ -1,6 +1,7 @@ package vmx import ( + "context" "fmt" "log" "path/filepath" diff --git a/common/multistep_debug.go b/common/multistep_debug.go index 1a5fc9f10..2d1a58291 100644 --- a/common/multistep_debug.go +++ b/common/multistep_debug.go @@ -2,13 +2,11 @@ package common import ( "fmt" - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "log" "time" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) // MultistepDebugFn will return a proper multistep.DebugPauseFn to diff --git a/common/step_create_floppy.go b/common/step_create_floppy.go index 8b0ef8b83..dd4ead840 100644 --- a/common/step_create_floppy.go +++ b/common/step_create_floppy.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "io" "io/ioutil" diff --git a/common/step_create_floppy_test.go b/common/step_create_floppy_test.go index a84c64677..2128e4dd7 100644 --- a/common/step_create_floppy_test.go +++ b/common/step_create_floppy_test.go @@ -3,8 +3,6 @@ package common import ( "bytes" "fmt" - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" "io/ioutil" "log" "os" @@ -14,8 +12,8 @@ import ( "strings" "testing" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) const TestFixtures = "test-fixtures" diff --git a/common/step_download.go b/common/step_download.go index bdcd7ac65..ac62fa698 100644 --- a/common/step_download.go +++ b/common/step_download.go @@ -1,6 +1,7 @@ package common import ( + "context" "crypto/sha1" "encoding/hex" "fmt" diff --git a/common/step_download_test.go b/common/step_download_test.go index 86d632867..2b6476614 100644 --- a/common/step_download_test.go +++ b/common/step_download_test.go @@ -1,10 +1,9 @@ package common import ( - "github.com/hashicorp/packer/helper/multistep" "testing" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func TestStepDownload_Impl(t *testing.T) { diff --git a/common/step_http_server.go b/common/step_http_server.go index 70b1e1460..e90c6ef60 100644 --- a/common/step_http_server.go +++ b/common/step_http_server.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "io/ioutil" "log" diff --git a/common/step_provision.go b/common/step_provision.go index 971ef97fb..9c842044b 100644 --- a/common/step_provision.go +++ b/common/step_provision.go @@ -1,13 +1,12 @@ package common import ( - "github.com/hashicorp/packer/helper/multistep" - "github.com/hashicorp/packer/packer" + "context" "log" "time" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" ) // StepProvision runs the provisioners. diff --git a/common/step_provision_test.go b/common/step_provision_test.go index f7c40b51d..a37d7681b 100644 --- a/common/step_provision_test.go +++ b/common/step_provision_test.go @@ -1,10 +1,9 @@ package common import ( - "github.com/hashicorp/packer/helper/multistep" "testing" - "github.com/mitchellh/multistep" + "github.com/hashicorp/packer/helper/multistep" ) func TestStepProvision_Impl(t *testing.T) { diff --git a/helper/communicator/step_connect.go b/helper/communicator/step_connect.go index 67a5eebbe..541f88fe1 100644 --- a/helper/communicator/step_connect.go +++ b/helper/communicator/step_connect.go @@ -1,6 +1,7 @@ package communicator import ( + "context" "fmt" "log" diff --git a/helper/communicator/step_connect_ssh.go b/helper/communicator/step_connect_ssh.go index 2f3ae3666..680b88a02 100644 --- a/helper/communicator/step_connect_ssh.go +++ b/helper/communicator/step_connect_ssh.go @@ -1,6 +1,7 @@ package communicator import ( + "context" "errors" "fmt" "log" diff --git a/helper/communicator/step_connect_winrm.go b/helper/communicator/step_connect_winrm.go index 97e7805d6..06e6236f8 100644 --- a/helper/communicator/step_connect_winrm.go +++ b/helper/communicator/step_connect_winrm.go @@ -2,6 +2,7 @@ package communicator import ( "bytes" + "context" "errors" "fmt" "io" diff --git a/post-processor/vagrant-cloud/step_create_provider.go b/post-processor/vagrant-cloud/step_create_provider.go index 028e5c6c7..e664b8b19 100644 --- a/post-processor/vagrant-cloud/step_create_provider.go +++ b/post-processor/vagrant-cloud/step_create_provider.go @@ -1,7 +1,9 @@ package vagrantcloud import ( + "context" "fmt" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" ) diff --git a/post-processor/vagrant-cloud/step_create_version.go b/post-processor/vagrant-cloud/step_create_version.go index d8e6b9df8..feb247f0a 100644 --- a/post-processor/vagrant-cloud/step_create_version.go +++ b/post-processor/vagrant-cloud/step_create_version.go @@ -1,7 +1,9 @@ package vagrantcloud import ( + "context" "fmt" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" ) diff --git a/post-processor/vagrant-cloud/step_prepare_upload.go b/post-processor/vagrant-cloud/step_prepare_upload.go index 1bcc05885..bdab16d10 100644 --- a/post-processor/vagrant-cloud/step_prepare_upload.go +++ b/post-processor/vagrant-cloud/step_prepare_upload.go @@ -1,6 +1,7 @@ package vagrantcloud import ( + "context" "fmt" "github.com/hashicorp/packer/helper/multistep" diff --git a/post-processor/vagrant-cloud/step_release_version.go b/post-processor/vagrant-cloud/step_release_version.go index 5f7fbb0f0..94e4b90da 100644 --- a/post-processor/vagrant-cloud/step_release_version.go +++ b/post-processor/vagrant-cloud/step_release_version.go @@ -1,6 +1,7 @@ package vagrantcloud import ( + "context" "fmt" "strings" diff --git a/post-processor/vagrant-cloud/step_upload.go b/post-processor/vagrant-cloud/step_upload.go index 576558b24..cce1e9de2 100644 --- a/post-processor/vagrant-cloud/step_upload.go +++ b/post-processor/vagrant-cloud/step_upload.go @@ -1,6 +1,7 @@ package vagrantcloud import ( + "context" "fmt" "log" diff --git a/post-processor/vagrant-cloud/step_verify_box.go b/post-processor/vagrant-cloud/step_verify_box.go index baee6222a..f1dafc991 100644 --- a/post-processor/vagrant-cloud/step_verify_box.go +++ b/post-processor/vagrant-cloud/step_verify_box.go @@ -1,7 +1,9 @@ package vagrantcloud import ( + "context" "fmt" + "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" )