chore: bump Go 1.15→1.25, upgrade deps, modernize interface{} to any#7
chore: bump Go 1.15→1.25, upgrade deps, modernize interface{} to any#7
Conversation
- Bump go directive to 1.25
- Bump grpc v1.56.3 → v1.75.0, options → v0.2.3, log → v0.2.4, uuid → v1.6.0
- Replace 12 interface{} → any in notifier/notifier.go
- Fix non-constant fmt.Errorf format strings (Go 1.25 vet)
|
Warning Rate limit exceeded
⌛ 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. 📝 WalkthroughWalkthroughThe pull request updates the project to Go 1.25.0, modernizes the codebase by replacing Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
Go 1.26 toolchain normalizes go directive to 1.25.0; upgrade actions/checkout to v4 and actions/setup-go to v5 so CI installs a Go version that understands this format.
There was a problem hiding this comment.
Pull request overview
This PR updates the project to a newer Go toolchain version, upgrades key dependencies, and performs small modernization/compatibility fixes (e.g., any and go vet format-string compliance) across the library.
Changes:
- Bumped Go version (module + CI) and upgraded core deps including
grpc,uuid,log, andoptions. - Modernized notifier APIs/locals from
interface{}toany. - Adjusted
fmt.Errorfusage to avoid non-constant format-string vet failures under newer Go versions.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
notifier/notifier.go |
Updates variadic APIs and maps/slices from interface{} to any. |
go.mod |
Bumps Go version directive and updates required dependencies/indirect requirements. |
errors.go |
Fixes fmt.Errorf calls to use a constant format string for go vet compatibility. |
.github/workflows/go.yml |
Updates GitHub Actions to newer checkout/setup-go and targets Go 1.25. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if tags, ok := data.(isTags); ok { | ||
| tagData = append(tagData, tags.value()) | ||
| } else { | ||
| extraData[reflect.TypeOf(data).String()+strconv.Itoa(pos)] = data | ||
| } |
There was a problem hiding this comment.
parseRawData can panic when rawData contains a nil value: reflect.TypeOf(data) returns nil, so calling .String() will panic. Since this code runs in the error-notification path, it would be safer to guard data == nil (e.g., skip it or store it under a stable key like "nil"+pos).
| // NewWithSkip creates a new error skipping the number of function on the stack | ||
| func NewWithSkip(msg string, skip int) ErrorExt { | ||
| return WrapWithSkip(fmt.Errorf(msg), "", skip+1) | ||
| return WrapWithSkip(fmt.Errorf("%s", msg), "", skip+1) | ||
| } | ||
|
|
||
| // NewWithSkipAndStatus creates a new error skipping the number of function on the stack and GRPC status | ||
| func NewWithSkipAndStatus(msg string, skip int, status *grpcstatus.Status) ErrorExt { | ||
| return WrapWithSkipAndStatus(fmt.Errorf(msg), "", skip+1, status) | ||
| return WrapWithSkipAndStatus(fmt.Errorf("%s", msg), "", skip+1, status) | ||
| } |
There was a problem hiding this comment.
fmt.Errorf("%s", msg) is equivalent to errors.New(msg) here, but incurs formatting overhead and makes intent less direct. Consider using errors.New(msg) (from the stdlib) for a simple string error while still satisfying go vet’s constant-format requirement.
|
creating a new pr |
Summary by CodeRabbit
Bug Fixes
Chores