Skip to content

Commit

Permalink
Removed dead code (#742)
Browse files Browse the repository at this point in the history
  • Loading branch information
denis256 authored Jul 12, 2024
1 parent 29dec17 commit 663cde4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
5 changes: 0 additions & 5 deletions aws/resources/kms_customer_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ func (kck *KmsCustomerKeys) getAll(c context.Context, configObj config.Config) (
for _, keyId := range keys {
resultsChan[id] = make(chan *KmsCheckIncludeResult, 1)

if err != nil {
logging.Debugf("Can't read KMS key %s", err.Error())
continue
}

// If the keyId isn't found in the map, this returns an empty array
aliasesForKey := keyAliases[keyId]

Expand Down
4 changes: 0 additions & 4 deletions aws/resources/lambda_layer.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@ func (ll *LambdaLayers) nukeAll(names []*string) error {

_, err := ll.Client.DeleteLayerVersionWithContext(ll.Context, params)

if err != nil {
return err
}

// Record status of this resource
e := report.Entry{
Identifier: aws.StringValue(params.LayerName),
Expand Down
2 changes: 1 addition & 1 deletion aws/resources/security_hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (sh *SecurityHub) nukeAll(securityHubArns []string) error {
}

// Remove any member accounts if they exist
if err == nil && len(memberAccountIds) > 0 {
if len(memberAccountIds) > 0 {
err = sh.removeMembersFromHub(memberAccountIds)
if err != nil {
logging.Errorf("[Failed] Failed to disassociate members from security hub")
Expand Down

0 comments on commit 663cde4

Please sign in to comment.