Skip to content

Commit 2123e27

Browse files
committed
Revert "terraform: config clone"
This reverts commit 1136273.
1 parent 2f4d753 commit 2123e27

File tree

1 file changed

+0
-24
lines changed
  • third_party/github.com/hashicorp/terraform-provider-google-beta/google-beta/transport

1 file changed

+0
-24
lines changed

third_party/github.com/hashicorp/terraform-provider-google-beta/google-beta/transport/config.go

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -322,30 +322,6 @@ type Config struct {
322322
RequestBatcherIam *RequestBatcher
323323
}
324324

325-
func (c *Config) Clone() *Config {
326-
clone := *c
327-
328-
// To prevent subtle bugs, create new copies of any slice fields.
329-
// This ensures that appending to a slice in the clone doesn't
330-
// accidentally modify the original config's slice.
331-
if c.ImpersonateServiceAccountDelegates != nil {
332-
clone.ImpersonateServiceAccountDelegates = make([]string, len(c.ImpersonateServiceAccountDelegates))
333-
copy(clone.ImpersonateServiceAccountDelegates, c.ImpersonateServiceAccountDelegates)
334-
}
335-
336-
if c.Scopes != nil {
337-
clone.Scopes = make([]string, len(c.Scopes))
338-
copy(clone.Scopes, c.Scopes)
339-
}
340-
341-
if c.gRPCLoggingOptions != nil {
342-
clone.gRPCLoggingOptions = make([]option.ClientOption, len(c.gRPCLoggingOptions))
343-
copy(clone.gRPCLoggingOptions, c.gRPCLoggingOptions)
344-
}
345-
346-
return &clone
347-
}
348-
349325
const AccessApprovalBasePathKey = "AccessApproval"
350326
const AccessContextManagerBasePathKey = "AccessContextManager"
351327
const ActiveDirectoryBasePathKey = "ActiveDirectory"

0 commit comments

Comments
 (0)