packer-cn/builder/googlecompute
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
..
test-fixtures builder/googlecompute: Tests added 2016-11-03 12:45:52 -04:00
account.go revert unneeded changes to driver roles 2020-05-08 10:13:42 -07:00
artifact.go Sharing info with post-processors via artifact (#8632) 2020-01-30 11:27:58 +01:00
artifact_test.go Sharing info with post-processors via artifact (#8632) 2020-01-30 11:27:58 +01:00
builder.go builder/googlecompute: add support for oslogin (#9339) 2020-07-08 06:30:25 -04:00
config.go Support using WinRM over an IAP tunnel 2020-07-19 01:28:31 +01:00
config.hcl2spec.go ci/tech-debt: Fix vmware acceptance tests (#9636) 2020-07-23 09:40:57 +02:00
config_test.go Fix failing tests due to IAP communicator host name 2020-07-22 12:58:05 +01:00
driver.go builder/googlecompute: add support for oslogin (#9339) 2020-07-08 06:30:25 -04:00
driver_gce.go Fix static check issues SA1019 for googlecompute plugins (#9950) 2020-09-17 10:14:41 +02:00
driver_mock.go builder/googlecompute: add support for oslogin (#9339) 2020-07-08 06:30:25 -04:00
image.go [gcp] Fixup for the deprecated Secure Boot guest OS feature (#9371) 2020-06-10 16:21:11 +02:00
image_test.go gofmt project. 2016-09-29 14:13:06 -07:00
networking.go builder/googlecompute: Test networking interpolation 2017-11-06 21:22:53 -08:00
networking_test.go builder/googlecompute: Test networking interpolation 2017-11-06 21:22:53 -08:00
startup.go builder/googlecompute: add support for oslogin (#9339) 2020-07-08 06:30:25 -04:00
step_check_existing_image.go Remove config interface. Make CreateImage function to accept config as list of config fields 2019-05-05 17:17:08 +02:00
step_check_existing_image_test.go Remove config interface. Make CreateImage function to accept config as list of config fields 2019-05-05 17:17:08 +02:00
step_create_image.go builder/googlecompute: add support to specify storage location for GCP images (#9326) 2020-06-02 13:42:33 -04:00
step_create_image_test.go builder/googlecompute: add support to specify storage location for GCP images (#9326) 2020-06-02 13:42:33 -04:00
step_create_instance.go builder/googlecompute: add support for oslogin (#9339) 2020-07-08 06:30:25 -04:00
step_create_instance_test.go builder/googlecompute: Add WrapStartupScriptFile configuration option 2020-07-07 07:08:09 -04:00
step_create_ssh_key.go Remove config interface. Make CreateImage function to accept config as list of config fields 2019-05-05 17:17:08 +02:00
step_create_ssh_key_test.go Remove config interface. Make CreateImage function to accept config as list of config fields 2019-05-05 17:17:08 +02:00
step_create_windows_password.go get data sharing to a working state with the powershell provisioner 2019-12-11 15:43:38 -08:00
step_create_windows_password_test.go Remove config interface. Make CreateImage function to accept config as list of config fields 2019-05-05 17:17:08 +02:00
step_import_os_login_ssh_key.go builder/googlecompute: add support for oslogin (#9339) 2020-07-08 06:30:25 -04:00
step_import_os_login_ssh_key_test.go builder/googlecompute: add support for oslogin (#9339) 2020-07-08 06:30:25 -04:00
step_instance_info.go Change back to make sure all durations are a time.Duration 2019-10-31 16:12:07 +01:00
step_instance_info_test.go Change back to make sure all durations are a time.Duration 2019-10-31 16:12:07 +01:00
step_start_tunnel.go Set project via project flag, not setting in the config (#9662) 2020-07-29 10:50:11 +02:00
step_start_tunnel.hcl2spec.go rename launch timeout to launch wait 2020-07-15 10:24:55 -07:00
step_start_tunnel_test.go Set project via project flag, not setting in the config (#9662) 2020-07-29 10:50:11 +02:00
step_teardown_instance.go Change back to make sure all durations are a time.Duration 2019-10-31 16:12:07 +01:00
step_teardown_instance_test.go Remove config interface. Make CreateImage function to accept config as list of config fields 2019-05-05 17:17:08 +02:00
step_test.go move multistep imports to helper. 2018-01-24 17:09:15 -08:00
step_wait_startup_script.go builder/googlecompute: Add WrapStartupScriptFile configuration option 2020-07-07 07:08:09 -04:00
step_wait_startup_script_test.go builder/googlecompute: Add WrapStartupScriptFile configuration option 2020-07-07 07:08:09 -04:00
template_funcs.go Revert "fix template imports" 2019-11-04 14:29:00 -08:00
template_funcs_test.go add a couple of extra tests and reword documentation 2017-10-20 14:06:02 -07:00
tunnel_driver.go make tunnel timeout configurable 2020-07-15 10:17:13 -07:00
tunnel_driver_windows.go make tunnel timeout configurable 2020-07-15 10:17:13 -07:00
winrm.go Remove config interface. Make CreateImage function to accept config as list of config fields 2019-05-05 17:17:08 +02:00