Skip to content

🧹 aws: modernize Go syntax (any, slices.Chunk, stdlib slices)#6889

Merged
tas50 merged 2 commits intomainfrom
aws-go125-modernize
Mar 17, 2026
Merged

🧹 aws: modernize Go syntax (any, slices.Chunk, stdlib slices)#6889
tas50 merged 2 commits intomainfrom
aws-go125-modernize

Conversation

@tas50
Copy link
Copy Markdown
Member

@tas50 tas50 commented Mar 12, 2026

Summary

  • Replace interface{} with any across 12 resource files (118 occurrences)
  • Convert 5 manual batch loops to slices.Chunk (route53, guardduty, opensearch, athena, macie)
  • Replace golang.org/x/exp/slices with stdlib slices in timestream
  • Remove dead remove() function from aws.go
  • Drop golang.org/x/exp dependency from go.mod
  • Remove 3x redundant region := region loop variable captures in networkfirewall (unnecessary since Go 1.22)
  • Use maps.Copy instead of manual map copy loop in discovery_test

🤖 Generated with Claude Code

Copy link
Copy Markdown

@mondoo-code-review mondoo-code-review bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mechanical modernization of Go syntax with no behavioral changes.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 12, 2026

Test Results

5 424 tests  ±0   5 420 ✅ ±0   2m 12s ⏱️ -27s
  412 suites ±0       4 💤 ±0 
   31 files   ±0       0 ❌ ±0 

Results for commit 987771b. ± Comparison against base commit 2116076.

♻️ This comment has been updated with latest results.

tas50 and others added 2 commits March 17, 2026 11:54
…lices)

- Replace `interface{}` with `any` across 12 files (118 occurrences)
- Convert 5 manual batch loops to `slices.Chunk` (route53, guardduty, opensearch, athena, macie)
- Replace `golang.org/x/exp/slices` with stdlib `slices` in timestream
- Remove dead `remove()` function from aws.go
- Drop `golang.org/x/exp` dependency from go.mod

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove 3x unnecessary `region := region` in networkfirewall (Go 1.22+)
- Use `maps.Copy` instead of manual map copy loop in discovery_test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tas50 tas50 force-pushed the aws-go125-modernize branch from 987771b to d2d1ab3 Compare March 17, 2026 18:54
@tas50 tas50 merged commit b1cfd1c into main Mar 17, 2026
20 checks passed
@tas50 tas50 deleted the aws-go125-modernize branch March 17, 2026 18:58
@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant