diff --git a/builder/alicloud/ecs/step_attach_keypair.go b/builder/alicloud/ecs/step_attach_keypair.go index 1bb901f9803..8fa2eedfb9f 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 b9dc58f6911..6090d8868d7 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 edf0b27489a..c9446bc47a2 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 9c68ce92ecb..e49ae65fbd8 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 e87a20079d1..7e0a246e016 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 4414eefe6ef..951f6e6fe02 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 618b4a3da9d..36d52838ff3 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 5510acb3bae..c1494e9d086 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 098323307dd..ae5840c0955 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 694ee0046df..5001fe4dfc8 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 39e56e7bd11..d3f6139f0e1 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 509d06615d6..642605bee96 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 bdcad2756e6..6bc3b1060c8 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 e5039853970..dddf08488da 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 2bac6dc913c..72491dd1d8e 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 2f6fbf06fda..f954eb42130 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 055f0d5d94e..d57a52c12bc 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 f386a031b6e..01ab3246483 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 582a76b8df1..5ff66d055af 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 6eb4226c590..be866707797 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 d1bdb32b49f..a973a5d81d9 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 10f49b0dfdb..b3c205b2683 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 449cb2a89d0..34e7817dfa5 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 8c15713f86d..225e91fb97a 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 d7ef614ff87..d75adc7f000 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 8811a49ffc8..558e28a8de0 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 06fae421050..f9fc7b0a8e7 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 7ebbb650a7d..ffd8ac02716 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 220e32a07eb..a00e8e1bfb7 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 b3a8aae6b8b..ce3c26e0222 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 4724457e5a4..0939d33cd17 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 d73ea8b2177..6fa9838b0dd 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 68a7bce2c0c..3fb3ff701d3 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 9125453ea5b..a3d92b46772 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 903aea91aa2..47078b6ac6a 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 549987b6b71..9c176d3c726 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 66174bea09f..a07c0ee25ee 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 28847003df0..5e2a236c2f2 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 3558b1df2e6..927101fcffa 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 7ba1deb6fc3..26ab3198665 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 4145bc66927..c2c454e060e 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 57fca3faddd..73b4022b7ad 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 6029ac617ec..c5e3382ec4c 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 3d3ff8f35cf..031842cd3c8 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 bc3b9dd1765..5e57c2fbf62 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 efef99b8a96..10a2f5a455f 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 158f970e0d4..3fd0de64f82 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 1ee7319bd04..0dde4fc3051 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 28c01f52db3..002ed00af8b 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 111f20268b7..3b607fbd0e4 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 42076dec22c..a638ec43976 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 61c2f5aad22..1c8b006b805 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 9fb41d44137..c46ff8ae4a5 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 80ba9e88b9f..1e7711d42c6 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 3853a53c15e..14ea955e5c0 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 2da5bedc4dd..9e640a891d5 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 787aad132f3..e0535adf650 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 92e9f97578d..723c87db0f7 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 a3bc2073b1d..a16ebf8f2c2 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 06baddb2463..af838c301f1 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 df347e468a2..784826771b0 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 f6ef7dc1bb7..ee28f30547b 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 706f37a5479..5e32e0eea23 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 e44b13c97a6..693348325b7 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 4729af0c0ae..ef883207453 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 c0115b00327..aa46455e05c 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 bdf92e65235..92927de5abf 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 66dda1a3cc1..da2cb5bf567 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 d7836d22c60..cc62f4eecc8 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 1e2e322b040..ff37a540af7 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 1ca0a4f70d7..19f6a3c28f6 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 fb5f24a4acb..c42eec5d5dc 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 928e231d131..4afba86992f 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 7334da372fb..e1f002b76bd 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 3c2944c7d98..644547018ff 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 10a4acbdd20..a7f07e8b28a 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 d32f5f888b8..d248ee64c9a 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 b828aa3e212..ff2db0ad7c9 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 2e3a3270a4a..ef0222a910b 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 b11319f8150..138e0f00cef 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 622d0ee5a92..1b1221e62cf 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 9460299437b..fd011680e44 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 6bd3d5e845d..9b8ed1d1bc8 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 c5b8fc5257b..1d2ba6862ec 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 66bd02bafea..9993cb3578e 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 d3c1502ff17..a5b1d6adefc 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 fa0702612bd..0c7d5664949 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 92a79f3fae3..ac11600e1d8 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 36f9e110a95..1c499e743d0 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 16434f6c7d2..72e6a06ebbd 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 1a713f12377..ee3b6643b1f 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 f121e3daed5..7d5a24555e1 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 b7d09e10dc8..3386f6fbc05 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 5604b3e9b38..d67984b7598 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 8ced83c5de7..3918a009ec2 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 e40e2fc7b87..27f9fee3578 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 295230e0139..f19dac96065 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 9770d7cb359..efc2a78f79d 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 a48176a6135..51643eb2d8d 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 cda0c5da56b..f6dc9e3908e 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 d9ca74344c8..41d945a0d9b 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 ea26af22ec7..a167b9ed1b9 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 1e0ea697676..56e6fa6e860 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 0b1df3342b1..4b5ef48e288 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 a9829608c0c..1a9767fe55b 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 1e28889c7f4..291fdc5dc44 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 acd0d323d7b..0d4882ec153 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 ddb74c41d2b..e3f8fd70a70 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 f5ff4cf93dc..6de5dbb70c6 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 8957fe6c28c..945c6a86dfe 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 ecf9b01947b..1ae03d1db75 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 f20e070d34d..71b6c3eec1d 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 9b29a84a006..c23e39fac44 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 cad96b98e36..fc39d08b214 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 092c01b1740..b9d2984f6d4 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 850c6aac9ed..8e2bec1b80e 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 ead7396678c..cd8213c5e63 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 ddced961954..b37716f60db 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 fbf671cdf0c..e65bcf0b198 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 515c30907de..43deee1fd0c 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 cb62bc13102..010e8b067c7 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 07dff3b70d9..34f09aaa01c 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 112c9c825e6..06600ddaa8c 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 3de0f7ac6cd..0f74d2789dc 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 ee7d11beb2b..0a40730b3db 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 74c8de44ecf..fa164d85f90 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 7792a365ca1..e428672c670 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 82683b89087..8c239cd9beb 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 2bafdeb41e0..f01b30074f3 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 9efb7bc87b8..98dce3a7c58 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 1dd082580ed..25479fd8a95 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 937435d85c2..ac33eb301cd 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 19383fb62c2..4e055a690e7 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 d1b040853f8..290b8a631ee 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 f1a6f6b4526..de34a5cb45c 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 dedd1a2ae8c..509006d77f2 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 4a6c206fe42..4dc21880f98 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 7b7be84aad8..4b84b39383d 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 8aa05fb4819..cffd8c44049 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 9a1a5852821..a27561c1fb4 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 cedfb604af6..65a3f715600 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 eda4122ce3f..e23e545880a 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 15f214d1783..fb53ce4349f 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 777a3cb6ad2..de8a6f4f66b 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 95f52e19451..4b962db4bad 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 fb46c1392f6..c4eba5804a8 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 a5ffe814547..b11cf5527a5 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 00f1b709225..8c331aa6a1e 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 ebbc4577331..bb09f85b70c 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 bc651b7ce5d..1c864eef0a6 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 bd814638b7f..8d9a3bc7c41 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 f214e08945a..6cbe2ed0ea1 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 cb1ce6642af..375b92b1b1d 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 46c7ed8ba90..ff767f7091e 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 9b79529cce9..d3e0249780c 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 c9e80e54ba6..9fa83c17dbf 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 bd81165974a..fa956601188 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 645cec0d7c3..1c1ea31b4aa 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 90f05b7f93e..85688de51a0 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 c94ab3928a4..f6f092c4a87 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 c64fd395bea..5da892782f8 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 eea179a706d..9ae6ec7e92c 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 b37e536d5ec..073ad0550eb 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 10a4c5a3f28..7f9d3b66322 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 bd6adbfd848..e39a90b6cb1 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 86bd5171b5b..0da0b26e0fb 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 982f38f9fb5..1a1bfcf0ce0 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 bfb7bacf9c5..a4cf634a870 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 d98f8c5b48b..42640f5a8b5 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 255bafaaa9f..8a4e22517ed 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 5b44d98af35..cfcda608096 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 c8b97dd5488..0907c6b44e5 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 fc7734a07d4..6a142807566 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 926864118c9..00742762a3e 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 4c1a75d1805..be0b973a8e2 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 8cbc208b8d6..a3bfe2d7d39 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 fe7025b8443..0c393500459 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 5d412b81120..1f1cd088da7 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 209361f5d08..bc5c3f3b136 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 a6a2e8ca1cd..51ca47a1df6 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 05b5d08335a..4472903f152 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 296c94d19a9..6e9efaca1df 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 f24138c4c8d..8eeebb4e14c 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 63b430187f2..8ffab5931f2 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 463c8bf074e..c524d55147c 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 e17bbd2542b..dba34777f70 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 394fc16fa73..9c5f89f6c47 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 dbc896a48fe..f1dc895e98b 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 df83e520512..425a6690bdb 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 bca123508ba..c3097fae2d5 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 28d27f268bd..8f9e1bc1fa1 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 6c01805a506..73fa3f4d6d3 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 00fef044a58..bccc398c748 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 ff777d89059..de0a7cc8450 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 f8c20f3f509..6c73aa4b467 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 85f8ca0c2eb..9dba8adf100 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 c6b88d1c836..d5698c3722a 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 2cf2659d821..6cc960ad30b 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 750f825e52e..1aebca144dc 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 a09b5c01c35..03b02e8e405 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 fee2cafdb4f..1bea8df5779 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 4bcd2dc6665..b4e3b2f25a2 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 cad96b98e36..fc39d08b214 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 48f4634f4a4..5066e0e56a4 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 4a4a24a9e37..835fd5af8f0 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 9a2e8ee3a9c..0d9f6bbe9d6 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 391d8c25e47..62d98d89421 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 7acf9768315..af2539cac34 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 aa36a6c91f3..d38b3378c46 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 1805a05357c..369911bdbfb 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 d5609d45679..ad3a59fd7de 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 ec08544159f..c8a12abb665 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 9978057323e..cb5b43648ae 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 6de891ffd58..c77ef7d2217 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 fa154c7ae22..deaf8824db9 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 cfd940a4bf5..17609b9aaed 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 54ef96e0f99..948cae884cc 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 3c9fcc55e11..619d61afd0b 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 cb67af807bc..7c5b03e4f68 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 81a8a030494..72a556737bd 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 8ebf5fe4b62..5e066d83a52 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 aec090980b1..45054585c73 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 eb6522ef6f7..4f9a0f9d832 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 676e08f2f73..08d14cf632f 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 12cc6b2233b..f112227f8d7 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 cf0c4cf1916..e7823e3ba2b 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 369712b6ee8..155234ac4a5 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 1f18ce5bf73..90aa4a998be 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 35effe13865..90c71e18a26 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 cdfba2a2ecd..dd132638724 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 3ce77138709..72f8f148855 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 14334e77961..f85d5948f29 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 39557523152..b884351ddd1 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 5067ebbb2e6..bc8490ff38e 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 3e8721decd8..02928123a05 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 ec08544159f..c8a12abb665 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 8e6a663660a..05c66de1668 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 4dff6496e8b..eed55ab0b95 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 45723603487..ddee55c7f38 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 a071ed0f1a0..029f2a31ee9 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 4d08af159d5..4f6df9ed42b 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 a713620e607..c41b2550ba9 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 e1d396ab121..c978009104e 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 6199696f0cf..0d2aaaa977a 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 427ba28c6ee..c4dfda8e500 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 66fc38d36ee..958ab4734d7 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 360372765bd..f0fec436c91 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 e65ea0dcaa9..f7874067c27 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 1a5fc9f105d..2d1a58291ab 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 8b0ef8b832b..dd4ead840f4 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 a84c64677ec..2128e4dd75b 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 bdcd7ac658e..ac62fa698ac 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 86d632867d0..2b647661443 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 70b1e1460b6..e90c6ef600d 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 971ef97fb15..9c842044bae 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 f7c40b51d11..a37d7681b08 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 67a5eebbed7..541f88fe110 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 2f3ae366682..680b88a02fc 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 97e7805d640..06e6236f8d9 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 028e5c6c74d..e664b8b19e3 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 d8e6b9df8d3..feb247f0a0f 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 1bcc05885a1..bdab16d1037 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 5f7fbb0f099..94e4b90da03 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 576558b241b..cce1e9de2e1 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 baee6222a71..f1dafc99184 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" )