Skip to content

Modernize to Go 1.26#21

Merged
hayabusa-cloud merged 2 commits intomainfrom
go1.26
Feb 16, 2026
Merged

Modernize to Go 1.26#21
hayabusa-cloud merged 2 commits intomainfrom
go1.26

Conversation

@hayabusa-cloud
Copy link
Copy Markdown
Owner

Summary

Bump the minimum Go version to 1.26 and apply go fix modernizers.

Changes

  • Bump go.mod directive and CI matrix from 1.25 to 1.26
  • Use min()/max() builtins in backoff.go and test helpers
  • Use for range N in benchmarks

Test plan

  • go test -race passes, 100.0% coverage
  • Cross-builds clean (amd64, arm64, riscv64, loong64)

Copilot AI review requested due to automatic review settings February 16, 2026 13:26
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

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 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() and max() functions across production and test code
  • Modernized benchmark loops to use for range N syntax 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

@hayabusa-cloud hayabusa-cloud merged commit cd796d5 into main Feb 16, 2026
11 checks passed
@hayabusa-cloud hayabusa-cloud deleted the go1.26 branch February 16, 2026 13:35
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