chore: apply go fix improvements#84
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis pull request modernises Go code patterns across 15+ files in the codebase. The changes include converting traditional Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Add missing imports - Optimize string concatenation using strings.Builder - Use Go 1.22 range-over-int syntax
efcd192 to
c2cbc03
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rsql/helpers_test.go`:
- Around line 48-49: The helper assertEqualI2S forwards a variadic msgAndArgs
slice to testify's assert.Equal but doesn't expand it, so the messages are
passed as a single argument; update the call in assertEqualI2S to pass
msgAndArgs... (i.e., expand the variadic) when calling assert.Equal(t,
i2s(expected), actual, msgAndArgs...) so testify can interpret assertion
messages correctly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d3c88004-3e41-4780-bf1d-3f2303f4a0aa
📒 Files selected for processing (17)
internal/metrics/metrics_test.gorblob/blob.gorblob/blob_test.gorpatterns/batch_test.gorpatterns/concurrent.gorpatterns/concurrent_test.gorpatterns/cursor_test.gorpatterns/deadletter_test.gorpatterns/parallel.gorpatterns/sequence.gorsql/cursorstable.gorsql/cursorstable_test.gorsql/db.gorsql/db_test.gorsql/eventstable_test.gorsql/helpers_test.gorsql/stream_test.go
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|



Apply
go fixto modernize the codebase:strings.Builder(performance improvement over concatenation loops)for i := range Ninstead offor i := 0; i < N; i++)Summary by CodeRabbit
This release includes extensive internal code modernisation across the codebase, improving consistency and maintainability.
Refactor
Tests