b4be598148
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 ``` |
||
---|---|---|
.. | ||
alicloud-import | ||
amazon-import | ||
artifice | ||
checksum | ||
compress | ||
digitalocean-import | ||
docker-import | ||
docker-push | ||
docker-save | ||
docker-tag | ||
exoscale-import | ||
googlecompute-export | ||
googlecompute-import | ||
manifest | ||
shell-local | ||
ucloud-import | ||
vagrant | ||
vagrant-cloud | ||
vsphere | ||
vsphere-template | ||
yandex-export | ||
yandex-import |