chore: simplify, modernize (Go 1.26), update deps#97
Conversation
- handler.go: collapse two io.WriteString+HasSuffix calls into a single write; drop unused "strings" import - format_handler.go: replace append([]T(nil),...) idiom with slices.Clone for preAttrs and groups in clone() - deps: go get -u all + go mod tidy in root and tests/; go work sync
|
Warning Review limit reached
More reviews will be available in 46 minutes and 11 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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Pull request overview
This PR modernizes the module/toolchain and dependencies while making small simplifications in the logging handlers.
Changes:
- Updated module/workspace to Go 1.26 toolchain and refreshed dependencies (go mod tidy / go work sync).
- Simplified
RawHandler.Handleto ensure newline termination with a single write and removed an unused import. - Replaced manual slice-copy idioms with
slices.CloneinFormatHandler.clone().
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/go.sum |
Records updated dependency checksums after dependency refresh. |
handler.go |
Simplifies raw handler message writing and removes unused strings import. |
format_handler.go |
Uses slices.Clone for clearer slice copying in handler cloning. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Applied
handler.go:37io.WriteString+HasSuffixcalls into a single write; drop unusedstringsimportformat_handler.go:211append([]T(nil), ...)idiom withslices.CloneforpreAttrsandgroupsinclone()Deps
go get -u all && go mod tidyin root andtests/;go work sync.