diff --git a/plugins/providers/bigquery/client.go b/plugins/providers/bigquery/client.go index a7fd6dd52..94ac03c70 100644 --- a/plugins/providers/bigquery/client.go +++ b/plugins/providers/bigquery/client.go @@ -24,7 +24,6 @@ type bigQueryClient struct { func NewBigQueryClient(projectID string, opts ...option.ClientOption) (*bigQueryClient, error) { ctx := context.Background() - client, err := bq.NewClient(ctx, projectID, opts...) if err != nil { return nil, err diff --git a/plugins/providers/dataplex/client.go b/plugins/providers/dataplex/client.go index 6c72c5329..628a88c11 100644 --- a/plugins/providers/dataplex/client.go +++ b/plugins/providers/dataplex/client.go @@ -21,14 +21,10 @@ type policyTagClient struct { func newPolicyTagClient(projectID, location string, credentialsJSON []byte) (*policyTagClient, error) { ctx := context.Background() - opts := []option.ClientOption{ - option.WithCredentialsJSON(credentialsJSON), - } - policyManager, err := datacatalog.NewPolicyTagManagerClient(ctx, opts...) + policyManager, err := datacatalog.NewPolicyTagManagerClient(ctx, option.WithCredentialsJSON(credentialsJSON)) if err != nil { return nil, err } - return &policyTagClient{ policyManager: policyManager, projectId: projectID, diff --git a/plugins/providers/gate/provider.go b/plugins/providers/gate/provider.go index 6ecf6c766..55637d2d1 100644 --- a/plugins/providers/gate/provider.go +++ b/plugins/providers/gate/provider.go @@ -277,12 +277,7 @@ func (p *provider) getClient(pc *domain.ProviderConfig) (*gate.Client, error) { return nil, fmt.Errorf("failed to decrypt credentials: %w", err) } - opts := []gate.ClientOption{ - gate.WithAPIKey(creds.APIKey), - gate.WithQueryParamAuthMethod(), - } - - client, err := gate.NewClient(creds.Host, opts...) + client, err := gate.NewClient(creds.Host, gate.WithAPIKey(creds.APIKey), gate.WithQueryParamAuthMethod()) if err != nil { return nil, fmt.Errorf("failed to initialize client: %w", err) } diff --git a/plugins/providers/gcloudiam/client.go b/plugins/providers/gcloudiam/client.go index 15933085e..805fb42be 100644 --- a/plugins/providers/gcloudiam/client.go +++ b/plugins/providers/gcloudiam/client.go @@ -24,7 +24,6 @@ type iamClient struct { func newIamClient(credentialsJSON []byte, resourceName string) (*iamClient, error) { ctx := context.Background() - cloudResourceManagerService, err := cloudresourcemanager.NewService(ctx, option.WithCredentialsJSON(credentialsJSON)) if err != nil { return nil, err diff --git a/plugins/providers/gcs/http.go b/plugins/providers/gcs/http.go deleted file mode 100644 index 279768aa2..000000000 --- a/plugins/providers/gcs/http.go +++ /dev/null @@ -1,7 +0,0 @@ -package gcs - -import "net/http" - -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} diff --git a/plugins/providers/gitlab/provider.go b/plugins/providers/gitlab/provider.go index 140b571d2..42e4b32a8 100644 --- a/plugins/providers/gitlab/provider.go +++ b/plugins/providers/gitlab/provider.go @@ -271,7 +271,6 @@ func (p *provider) getClient(pc domain.ProviderConfig) (*gitlab.Client, error) { return nil, fmt.Errorf("unable to decrypt credentials: %w", err) } - // add trace for otel instrumentation client, err := gitlab.NewClient(creds.AccessToken, gitlab.WithBaseURL(creds.Host)) if err != nil { return nil, fmt.Errorf("unable to create gitlab client: %w", err)