Update dependencies and modernize code for Go 1.24#7
Merged
Conversation
- update golang.org/x/sync to v0.19.0, golang.org/x/time to v0.14.0
- enable modernize linter, bump golangci-lint to v2.7
- use range over int syntax throughout codebase
- replace interface{} with any in middleware
README.md fixes: - fix Go version requirement (1.23+ -> 1.24+) - fix trailing comma in Quick Start example - fix WithCompleteFn -> WithWorkerCompleteFn with correct signature - fix dependencies claim (now mentions golang.org/x packages) - clarify work distribution (shared channel vs random accumulator) - clarify completion callback behavior (skipped on context.Canceled only) - clarify Dropped metric is user-incrementable - clarify AvgLatency uses max ProcessingTime across workers CLAUDE.md: - add comprehensive project documentation for AI assistants
There was a problem hiding this comment.
Pull request overview
This PR modernizes the codebase for Go 1.24, updates dependencies, and fixes various documentation issues. The changes leverage Go 1.23+ features like range-over-int syntax and replace legacy interface{} with the any type alias.
- Updates golang.org/x/sync to v0.19.0, golang.org/x/time to v0.14.0, and testify to v1.11.1
- Adopts modern Go syntax: range-over-int loops and
anytype throughout the codebase - Fixes multiple documentation issues in README.md including incorrect function signatures, clarifications on work distribution, metrics behavior, and completion callbacks
Reviewed changes
Copilot reviewed 19 out of 27 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Updates Go version to 1.24.0 and bumps dependency versions |
| go.sum | Updates dependency checksums for new versions |
| pool.go | Modernizes code using max() built-in function |
| pool_test.go | Adopts range-over-int syntax in test loops |
| middleware/middleware.go | Replaces interface{} with any in Recovery function signature |
| middleware/middleware_test.go | Replaces interface{} with any in test variables and function signatures |
| metrics/metrics_test.go | Adopts range-over-int syntax in concurrent test loops |
| examples_test.go | Adopts range-over-int syntax in example code |
| bench_test.go | Adopts range-over-int syntax in benchmark loops |
| README.md | Fixes trailing comma in Quick Start, corrects function signatures, clarifies documentation on work distribution, metrics, and completion callbacks |
| CLAUDE.md | Adds comprehensive project documentation for Claude Code |
| .golangci.yml | Enables modernize linter |
| .github/workflows/ci.yml | Bumps golangci-lint to v2.7 |
| examples/*/go.mod | Updates Go version to 1.24.0 and adds toolchain directive for all example modules |
| examples/*/go.sum | Updates dependency checksums for example modules |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates dependencies and modernizes codebase for Go 1.24, plus fixes various documentation issues.
Changes
Code modernization:
Documentation fixes: