Skip to content

Commit

Permalink
Fix linter comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bjfish25 committed Feb 26, 2025
1 parent cae80b3 commit 22185ea
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions resources/appstream-images.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ func (l *AppStreamImageLister) List(ctx context.Context, o interface{}) ([]resou
}
nextToken = output.NextToken

for _, image := range output.Images {
for i := range output.Images {
sharedAccounts := []*string{}
visibility := string(image.Visibility)
visibility := string(output.Images[i].Visibility)

// Filter out public images
if strings.ToUpper(visibility) != "PUBLIC" {
if !strings.EqualFold(visibility, "PUBLIC") {
imagePerms, err := svc.DescribeImagePermissions(ctx, &appstream.DescribeImagePermissionsInput{
Name: image.Name,
Name: output.Images[i].Name,
})

if err != nil {
Expand All @@ -67,7 +67,7 @@ func (l *AppStreamImageLister) List(ctx context.Context, o interface{}) ([]resou

resources = append(resources, &AppStreamImage{
svc: svc,
name: image.Name,
name: output.Images[i].Name,
visibility: &visibility,
sharedAccounts: sharedAccounts,
})
Expand Down
3 changes: 2 additions & 1 deletion resources/kms-key.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ func (r *KMSKey) Remove(_ context.Context) error {
PendingWindowInDays: aws.Int64(7),
})

// Ignore errors if the setting is enabled as AWS KMS keys can be in a state where they can't be deleted and we don't want to fail the whole nuke if setting is enabled
// Ignore errors if the setting is enabled as AWS KMS keys can be in a state where they can't
// be deleted and we don't want to fail the whole nuke if setting is enabled
if err != nil && r.settings.GetBool("IgnoreErrors") {
fmt.Printf("ignoring error for key %s. Error: %v\n", *r.ID, err)
return nil
Expand Down
1 change: 0 additions & 1 deletion resources/msk-cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ func (l *MSKClusterLister) List(ctx context.Context, o interface{}) ([]resource.
name: *cluster.ClusterName,
tags: cluster.Tags,
})

}
return resources, nil
}
Expand Down
4 changes: 2 additions & 2 deletions resources/wafregional-rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ func (f *WAFRegionalRule) Remove(ctx context.Context) error {
}

ruleUpdates := []wafregionalTypes.RuleUpdate{}
for _, predicate := range f.rule.Predicates {
for i := range f.rule.Predicates {
ruleUpdates = append(ruleUpdates, wafregionalTypes.RuleUpdate{
Action: wafregionalTypes.ChangeActionDelete,
Predicate: &predicate,
Predicate: &f.rule.Predicates[i],
})
}

Expand Down

0 comments on commit 22185ea

Please sign in to comment.