Skip to content

Conversation

@umputun
Copy link
Member

@umputun umputun commented Dec 28, 2025

Summary

Updates dependencies and modernizes codebase for Go 1.24, plus fixes various documentation issues.

Changes

Code modernization:

  • 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

Documentation fixes:

  • Fix Go version requirement (1.23+ to 1.24+)
  • Fix trailing comma in Quick Start example (would not compile)
  • Fix WithCompleteFn to 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
  • Add CLAUDE.md project documentation

- 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
Copilot AI review requested due to automatic review settings December 28, 2025 19:29
@umputun umputun merged commit ab83b51 into master Dec 28, 2025
6 checks passed
@umputun umputun deleted the update-deps-modernize branch December 28, 2025 19:32
Copy link

Copilot AI left a comment

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 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 any type 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.

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