Skip to content

Commit c118b3e

Browse files
GO: Upgrade Go version from 1.23 -> 1.24 (#15293) (#24584)
[upstream:d2e1e4a59ab8812bba8ed991b46f034301644c5a] Signed-off-by: Modular Magician <magic-modules@google.com>
1 parent 732d1c6 commit c118b3e

File tree

12 files changed

+16
-14
lines changed

12 files changed

+16
-14
lines changed

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.23
1+
1.24

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/hashicorp/terraform-provider-google
22

3-
go 1.23.0
3+
go 1.24.0
44

55
require (
66
cloud.google.com/go/auth v0.16.5

google/acctest/diff_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func writeOutputFileDeferFunction(tempOutputFile *os.File, failed bool) {
213213
fmt.Fprintf(os.Stdout, "%s Breaking Change Detected] \n", diffTag)
214214
fmt.Fprintf(diffFailureFile, "%s %s\n", diffTag, testOutput)
215215
} else {
216-
fmt.Fprintf(regularFailureFile, testOutput)
216+
fmt.Fprintf(regularFailureFile, "%s", testOutput)
217217
fmt.Fprintf(regularFailureFile, "FAILED --- %s\n", testOutput)
218218
}
219219
}

google/services/container/container_operation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (w *ContainerOperationWaiter) Error() error {
6060
}
6161

6262
if w.Op.StatusMessage != "" {
63-
return fmt.Errorf(w.Op.StatusMessage)
63+
return fmt.Errorf("%s", w.Op.StatusMessage)
6464
}
6565

6666
return nil

google/services/dataproc/resource_dataproc_job_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ func testAccCheckDataprocJobAttrMatch(n, jobType string, job *dataproc.Job) reso
561561

562562
for _, attrs := range jobTests {
563563
if c := checkMatch(attributes, attrs.tf_attr, attrs.gcp_attr); c != "" {
564-
return fmt.Errorf(c)
564+
return fmt.Errorf("%s", c)
565565
}
566566
}
567567

google/services/kms/kms_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ type kmsCryptoKeyVersionId struct {
128128
}
129129

130130
func (s *kmsCryptoKeyVersionId) cryptoKeyVersionId() string {
131-
return fmt.Sprintf(s.Name)
131+
return s.Name
132132
}
133133

134134
func (s *kmsCryptoKeyVersionId) TerraformId() string {

google/services/resourcemanager/data_source_google_service_accounts_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func TestAccDataSourceGoogleServiceAccounts_basic(t *testing.T) {
7272
resource.TestCheckResourceAttr("data.google_service_accounts.with_regex", "accounts.0.email", fmt.Sprintf("%s@%s.iam.gserviceaccount.com", sa_1, project)),
7373

7474
// Check if the account_id matches the prefix
75-
resource.TestCheckResourceAttr("data.google_service_accounts.with_prefix_and_regex", "accounts.0.account_id", fmt.Sprintf(sa_1)),
75+
resource.TestCheckResourceAttr("data.google_service_accounts.with_prefix_and_regex", "accounts.0.account_id", sa_1),
7676

7777
// Check if the email matches the regex
7878
resource.TestCheckResourceAttr("data.google_service_accounts.with_prefix_and_regex", "accounts.0.email", fmt.Sprintf("%s@%s.iam.gserviceaccount.com", sa_1, project)),
@@ -118,17 +118,19 @@ data "google_service_accounts" "with_prefix" {
118118
119119
data "google_service_accounts" "with_regex" {
120120
project = local.project_id
121-
regex = ".*${google_service_account.sa_one.account_id}.*@.*\\.gserviceaccount\\.com"
121+
regex = ".*%s.*@.*\\.gserviceaccount\\.com"
122122
}
123123
124124
data "google_service_accounts" "with_prefix_and_regex" {
125125
prefix = google_service_account.sa_one.account_id
126126
project = local.project_id
127-
regex = ".*${google_service_account.sa_one.account_id}.*@.*\\.gserviceaccount\\.com"
127+
regex = ".*%s.*@.*\\.gserviceaccount\\.com"
128128
}
129129
`,
130130
context["project"].(string),
131131
context["sa_1"].(string),
132132
context["sa_2"].(string),
133+
context["sa_1"].(string),
134+
context["sa_1"].(string),
133135
)
134136
}

google/services/storage/storage_operation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func (w *StorageOperationWaiter) QueryOp() (interface{}, error) {
5050
}
5151

5252
// Returns the proper get.
53-
url := fmt.Sprintf(w.SelfLink)
53+
url := w.SelfLink
5454

5555
return transport_tpg.SendRequest(transport_tpg.SendRequestOptions{
5656
Config: w.Config,

google/sweeper/hashi_sweeper_fork.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ func validateParentSweepers(sweepers map[string]*Sweeper) error {
483483
// If any validation errors were found, return them
484484
if len(validationErrors) > 0 {
485485
if len(validationErrors) == 1 {
486-
return fmt.Errorf(validationErrors[0])
486+
return fmt.Errorf("%s", validationErrors[0])
487487
}
488488
return fmt.Errorf("multiple parent validation issues: %s", strings.Join(validationErrors, "; "))
489489
}

google/transport/batcher_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func TestRequestBatcher_errInSend(t *testing.T) {
169169
log.Printf("[DEBUG] sendBatch body: %+v", body)
170170
for _, v := range body.([]int) {
171171
if v == failIdx {
172-
return nil, fmt.Errorf(expectedErrMsg)
172+
return nil, fmt.Errorf("%s", expectedErrMsg)
173173
}
174174
}
175175
return nil, nil

0 commit comments

Comments
 (0)