Skip to content

Commit

Permalink
Fix new lint errors introduced in Go 1.19.0 (#6398) (#4585)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Aug 9, 2022
1 parent 54a2128 commit b1b8485
Show file tree
Hide file tree
Showing 101 changed files with 127 additions and 41 deletions.
2 changes: 2 additions & 0 deletions .changelog/6398.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```release-note:none
```
1 change: 1 addition & 0 deletions google-beta/access_context_manager_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/active_directory_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/api_gateway_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/apigee_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/artifact_registry_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/certificate_manager_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/cloudfunctions2_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 0 additions & 1 deletion google-beta/compute_instance_helpers.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//
package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/data_fusion_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
16 changes: 8 additions & 8 deletions google-beta/data_source_google_iam_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import (
// to express a Google Cloud IAM policy in a data resource. This is an example
// of how the schema would be used in a config:
//
// data "google_iam_policy" "admin" {
// binding {
// role = "roles/storage.objectViewer"
// members = [
// "user:[email protected]",
// ]
// }
// }
// data "google_iam_policy" "admin" {
// binding {
// role = "roles/storage.objectViewer"
// members = [
// "user:[email protected]",
// ]
// }
// }
func dataSourceGoogleIamPolicy() *schema.Resource {
return &schema.Resource{
Read: dataSourceGoogleIamPolicyRead,
Expand Down
11 changes: 4 additions & 7 deletions google-beta/data_source_storage_object_signed_url.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ import (
"log"
"net/url"
"os"
"sort"
"strconv"
"strings"
"time"

"sort"

"github.com/hashicorp/errwrap"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
Expand Down Expand Up @@ -170,10 +169,9 @@ func dataSourceGoogleSignedUrlRead(d *schema.ResourceData, meta interface{}) err

// loadJwtConfig looks for credentials json in the following places,
// in order of preference:
// 1. `credentials` attribute of the datasource
// 2. `credentials` attribute in the provider definition.
// 3. A JSON file whose path is specified by the
// GOOGLE_APPLICATION_CREDENTIALS environment variable.
// 1. `credentials` attribute of the datasource
// 2. `credentials` attribute in the provider definition.
// 3. A JSON file whose path is specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable.
func loadJwtConfig(d *schema.ResourceData, meta interface{}) (*jwt.Config, error) {
config := meta.(*Config)

Expand Down Expand Up @@ -250,7 +248,6 @@ type UrlData struct {
// -------------------
// GET
//
//
// 1388534400
// bucket/objectname
// -------------------
Expand Down
1 change: 1 addition & 0 deletions google-beta/dataproc_metastore_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/datastore_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/dialogflow_cx_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
2 changes: 1 addition & 1 deletion google-beta/error_retry_predicates.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func isConnectionResetNetworkError(err error) (bool, string) {
// Retry 409s because some APIs like Cloud SQL throw a 409 if concurrent calls
// are being made.
//
//The only way right now to determine it is a retryable 409 due to
// The only way right now to determine it is a retryable 409 due to
// concurrent calls is to look at the contents of the error message.
// See https://github.com/hashicorp/terraform-provider-google/issues/3279
func is409OperationInProgressError(err error) (bool, string) {
Expand Down
1 change: 1 addition & 0 deletions google-beta/filestore_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/firebase_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/firestore_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/game_services_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/gke_hub_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam2_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_access_context_manager_access_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_api_gateway_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_api_gateway_api_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_api_gateway_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_apigee_environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_artifact_registry_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_beta_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_bigquery_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_bigquery_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_binary_authorization_attestor.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_cloud_run_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_cloud_tasks_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_cloudfunctions2_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_cloudfunctions_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_cloudiot_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_compute_backend_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_compute_backend_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_compute_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_compute_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_compute_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_compute_machine_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_compute_region_backend_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
1 change: 1 addition & 0 deletions google-beta/iam_compute_region_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import (
Expand Down
Loading

0 comments on commit b1b8485

Please sign in to comment.