Skip to content

chore: simplify, modernize (Go 1.26), update deps#81

Merged
rustatian merged 2 commits into
masterfrom
chore/cleanup-modernize-deps
Jun 3, 2026
Merged

chore: simplify, modernize (Go 1.26), update deps#81
rustatian merged 2 commits into
masterfrom
chore/cleanup-modernize-deps

Conversation

@rustatian

@rustatian rustatian commented May 29, 2026

Copy link
Copy Markdown
Member

Changes applied

S (simplify) — 2 applied:

  • rpc.go: dropped misleading stderr "errors" alias; no import conflict exists
  • rpc.go: replaced manual make+append key-collect loop with slices.Collect(maps.Keys(...))

M (modern Go) — 1 applied (same location as S above):

  • rpc.go: maps.Keys (Go 1.23 stdlib, available in this module's go 1.26)

R (review/correctness) — 1 applied:

  • plugin.go:33: changed bare pl.(Resetter) to two-value assertion; logs a warning and skips on mismatch instead of panicking if the framework ever passes a non-Resetter

Deps

go get -u all && go mod tidy in root and tests/; go work sync at root. No version changes resulted (deps were already current).

- rpc.go: drop misleading `stderr` alias for `errors` (no import conflict)
- rpc.go: replace manual key-collect loop with `slices.Collect(maps.Keys(...))`
- plugin.go: use two-value type assertion in Collects callback; log+skip on mismatch instead of panic
Copilot AI review requested due to automatic review settings May 29, 2026 12:43
@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@rustatian, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 33 minutes and 58 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cf589c17-c328-465b-ba91-b1b391a9d38c

📥 Commits

Reviewing files that changed from the base of the PR and between 52ab2fc and 59a7134.

⛔ Files ignored due to path filters (1)
  • go.work.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • plugin.go
  • rpc.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/cleanup-modernize-deps

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented May 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.33%. Comparing base (52ab2fc) to head (59a7134).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #81      +/-   ##
==========================================
- Coverage   84.61%   83.33%   -1.29%     
==========================================
  Files           2        2              
  Lines          26       24       -2     
==========================================
- Hits           22       20       -2     
  Misses          2        2              
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes the resetter service implementation by adopting newer Go stdlib helpers for map key collection and by hardening plugin collection to avoid panics when unexpected types are encountered.

Changes:

  • rpc.go: simplify error creation/imports and use maps.Keys + slices.Collect to build the plugin list.
  • plugin.go: replace a potentially panicking type assertion with a safe assertion that logs and skips non-Resetter values.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
rpc.go Simplifies imports/error aliasing and uses modern stdlib helpers to collect plugin names.
plugin.go Prevents panics during dependency collection by safely asserting Resetter and warning on mismatch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
@rustatian rustatian self-assigned this Jun 3, 2026
@rustatian rustatian merged commit 94c401c into master Jun 3, 2026
5 checks passed
@rustatian rustatian deleted the chore/cleanup-modernize-deps branch June 3, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants