Skip to content

Commit

Permalink
fix: remove unused code and cleanup golangci-lint violations
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed May 18, 2024
1 parent f8fddc5 commit 2fc5c5e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 23 deletions.
3 changes: 2 additions & 1 deletion resources/compute-disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ func (l *ComputeDiskLister) List(ctx context.Context, o interface{}) ([]resource

resources = append(resources, &ComputeDisk{
svc: l.svc,
Name: resp.Name,
project: opts.Project,
region: opts.Region,
Name: resp.Name,
Zone: ptr.String(zone),
Arch: resp.Architecture,
Size: resp.SizeGb,
Expand Down
1 change: 0 additions & 1 deletion resources/iam-service-account.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ type IAMServiceAccount struct {
svc *iamadmin.IamClient
settings *settings.Setting
project *string
region *string
fullName *string
ID *string
Name *string
Expand Down
20 changes: 0 additions & 20 deletions resources/kms-key.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,33 +112,13 @@ func (l *KMSKeyLister) List(ctx context.Context, o interface{}) ([]resource.Reso
type KMSKey struct {
svc *kms.KeyManagementClient
project *string
region *string
fullName *string
Name *string
Keyring *string
State *string
}

func (r *KMSKey) Remove(ctx context.Context) error {
/*
_, err := r.svc.UpdateCryptoKey(ctx, &kmspb.UpdateCryptoKeyRequest{
CryptoKey: &kmspb.CryptoKey{
Name: *r.fullName,
DestroyScheduledDuration: &durationpb.Duration{
Seconds: 0,
Nanos: 0,
},
},
UpdateMask: &fieldmaskpb.FieldMask{
Paths: []string{"destroy_scheduled_duration"},
},
})
if err != nil {
logrus.WithError(err).Debug("unable to update crypto key")
return err
}
*/

reqKeyVersions := &kmspb.ListCryptoKeyVersionsRequest{
Parent: *r.fullName,
}
Expand Down
1 change: 0 additions & 1 deletion resources/secretmanager-secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ func (l *SecretManagerSecretLister) List(ctx context.Context, o interface{}) ([]
type SecretManagerSecret struct {
svc *secretmanager.Client
project *string
region *string
fullName *string
Name *string
CreateTime time.Time
Expand Down

0 comments on commit 2fc5c5e

Please sign in to comment.