packer-cn/post-processor
Wilken Rivera b4be598148
Fix static check issues SA1019 for googlecompute plugins (#9950)
This change replaces the deprecated constructors `New` with
`NewService`.

Static check before the change
```
⇶  golangci-lint run --disable-all --no-config --enable=staticcheck | grep SA1019 | grep google
- post-processor/googlecompute-import/post-processor.go:183:18: SA1019:
storage.New is deprecated: please use NewService instead. To provide a
custom HTTP client, use option.WithHTTPClient. If you are using
google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey
with NewService instead.  (staticcheck)
- post-processor/googlecompute-import/post-processor.go:219:18: SA1019:
compute.New is deprecated: please use NewService instead. To provide a
custom HTTP client, use option.WithHTTPClient. If you are using
google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey
with NewService instead.  (staticcheck)
- post-processor/googlecompute-import/post-processor.go:273:18: SA1019:
storage.New is deprecated: please use NewService instead. To provide a
custom HTTP client, use option.WithHTTPClient. If you are using
google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey
with NewService instead.  (staticcheck)
- builder/googlecompute/driver_gce.go:127:18: SA1019: compute.New is
deprecated: please use NewService instead. To provide a custom HTTP
client, use option.WithHTTPClient. If you are using
google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey
with NewService instead.  (staticcheck)
- builder/googlecompute/driver_gce.go:132:25: SA1019: oslogin.New is
deprecated: please use NewService instead. To provide a custom HTTP
client, use option.WithHTTPClient. If you are using
google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey
with NewService instead.  (staticcheck)
```

Static check after change
```
[go-1.15.2] [1] wilken@automaton in ~/Development/packer/
⇶  golangci-lint run --disable-all --no-config --enable=staticcheck | grep SA1019 | grep google

```
2020-09-17 10:14:41 +02:00
..
alicloud-import ci/tech-debt: Fix vmware acceptance tests (#9636) 2020-07-23 09:40:57 +02:00
amazon-import add aws_polling config option to override env variables 2020-08-17 17:15:32 +02:00
artifice HCL2: generate hcl tags with go-cty tags too (#9306) 2020-05-28 11:19:00 +02:00
checksum update checksum post-processor docs 2020-08-05 19:46:17 +02:00
compress HCL2: generate hcl tags with go-cty tags too (#9306) 2020-05-28 11:19:00 +02:00
digitalocean-import Add check for empty artifact.Files slice (#9857) 2020-09-01 10:59:01 -04:00
docker-import make friendly error message (#9605) 2020-07-20 16:58:38 +02:00
docker-push HCL2: generate hcl tags with go-cty tags too (#9306) 2020-05-28 11:19:00 +02:00
docker-save HCL2: generate hcl tags with go-cty tags too (#9306) 2020-05-28 11:19:00 +02:00
docker-tag HCL2: generate hcl tags with go-cty tags too (#9306) 2020-05-28 11:19:00 +02:00
exoscale-import HCL2: generate hcl tags with go-cty tags too (#9306) 2020-05-28 11:19:00 +02:00
googlecompute-export post-processor/googlecompute-export: Update documentation (#9727) 2020-08-07 16:34:38 -04:00
googlecompute-import Fix static check issues SA1019 for googlecompute plugins (#9950) 2020-09-17 10:14:41 +02:00
manifest HCL2: generate hcl tags with go-cty tags too (#9306) 2020-05-28 11:19:00 +02:00
shell-local Share build info with Provisioner and Post-Processor via HCL2 variables (#9444) 2020-06-29 13:44:57 +02:00
ucloud-import update ucloud-uhost builder (#9466) 2020-06-24 14:31:05 +02:00
vagrant Interpolate vagrantfile_template on Vagrant post-processor (#9923) 2020-09-16 10:08:44 +02:00
vagrant-cloud post-processor/vagrant-cloud: missing vagrant_cloud_url in test (#9572) 2020-07-14 10:29:28 +02:00
vsphere fix return 2020-07-27 08:53:33 -07:00
vsphere-template Fix ReregisterVM to default to true instead of false. (#9736) 2020-08-10 13:13:14 +02:00
yandex-export Check for error after runner completes (#9925) 2020-09-11 11:14:49 +02:00
yandex-import Fix S3 URL construct process 2020-09-11 16:49:30 +03:00