Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes the codebase to use Go 1.26 by updating the minimum Go version requirement and applying modern Go syntax patterns introduced in recent versions. The changes leverage built-in min()/max() functions (Go 1.21+) and the for range N syntax (Go 1.22+) to simplify code and improve readability.
Changes:
- Updated Go version requirement from 1.25 to 1.26 in both go.mod and CI configuration
- Replaced conditional min/max logic with built-in
min()andmax()functions across production and test code - Modernized benchmark loops to use
for range Nsyntax where loop variables are unused
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Bumped Go directive from 1.25 to 1.26 |
| .github/workflows/ci.yml | Updated CI test matrix to use Go 1.26.x instead of 1.25.x |
| backoff.go | Replaced conditional min logic with min() builtin in Wait() and Duration() methods |
| tee_test.go | Simplified test helper Write() method using min() builtin |
| io_test.go | Modernized multiple test helper Write() methods using min()/max() builtins |
| bench_test.go | Updated benchmark setup loops to use for range N syntax |
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
Bump the minimum Go version to 1.26 and apply
go fixmodernizers.Changes
go.moddirective and CI matrix from 1.25 to 1.26min()/max()builtins in backoff.go and test helpersfor range Nin benchmarksTest plan
go test -racepasses, 100.0% coverage