diff --git a/builder/qemu/step_set_iso.go b/builder/qemu/step_set_iso.go index c5bfe6e95..338017632 100644 --- a/builder/qemu/step_set_iso.go +++ b/builder/qemu/step_set_iso.go @@ -5,7 +5,7 @@ import ( "fmt" "net/http" - commonhelper "github.com/hashicorp/packer/helper/common" + "github.com/hashicorp/packer/common/net" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" ) @@ -29,7 +29,7 @@ func (s *stepSetISO) Run(ctx context.Context, state multistep.StateBag) multiste req.Header.Set("User-Agent", "Packer") - httpClient := commonhelper.HttpClientWithEnvironmentProxy() + httpClient := net.HttpClientWithEnvironmentProxy() res, err := httpClient.Do(req) if err == nil && (res.StatusCode >= 200 && res.StatusCode < 300) { diff --git a/helper/common/default_client.go b/common/net/default_client.go similarity index 93% rename from helper/common/default_client.go rename to common/net/default_client.go index a9829568d..ae9b30b29 100644 --- a/helper/common/default_client.go +++ b/common/net/default_client.go @@ -1,4 +1,4 @@ -package common +package net import ( "net/http" diff --git a/post-processor/vagrant-cloud/client.go b/post-processor/vagrant-cloud/client.go index 4fbd37454..b91b6755a 100644 --- a/post-processor/vagrant-cloud/client.go +++ b/post-processor/vagrant-cloud/client.go @@ -11,7 +11,7 @@ import ( "os" "strings" - commonhelper "github.com/hashicorp/packer/helper/common" + "github.com/hashicorp/packer/common/net" ) type VagrantCloudClient struct { @@ -48,7 +48,7 @@ func (v VagrantCloudErrors) FormatErrors() string { func (v VagrantCloudClient) New(baseUrl string, token string, InsecureSkipTLSVerify bool) (*VagrantCloudClient, error) { c := &VagrantCloudClient{ - client: commonhelper.HttpClientWithEnvironmentProxy(), + client: net.HttpClientWithEnvironmentProxy(), BaseURL: baseUrl, AccessToken: token, }