chore: Go 1.26 modernization #17

Merged
Charon merged 7 commits from chore/go-1.26-modernization into main 2026-02-24 18:01:42 +00:00
Member

Modernize Go 1.23-era patterns to Go 1.26 idioms.

  • Replace interface{} with any (11 occurrences)
  • fmt.Errorf(static)errors.New (31 occurrences)
  • %s%w for error wrapping (1 occurrence)
  • sort.Sliceslices.SortFunc (13 occurrences)
  • Manual min/max → min()/max() builtins (14 occurrences)
  • C-style for → for i := range n (4 occurrences)
  • Manual contains loops → slices.Contains (3 occurrences)

Net reduction: -38 lines. All changes pass go build and go vet. No test files modified.

Modernize Go 1.23-era patterns to Go 1.26 idioms. - Replace `interface{}` with `any` (11 occurrences) - `fmt.Errorf(static)` → `errors.New` (31 occurrences) - `%s` → `%w` for error wrapping (1 occurrence) - `sort.Slice` → `slices.SortFunc` (13 occurrences) - Manual min/max → `min()`/`max()` builtins (14 occurrences) - C-style for → `for i := range n` (4 occurrences) - Manual contains loops → `slices.Contains` (3 occurrences) Net reduction: -38 lines. All changes pass `go build` and `go vet`. No test files modified.
Charon added 7 commits 2026-02-24 16:42:47 +00:00
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Charon merged commit c8b32cc1a1 into main 2026-02-24 18:01:42 +00:00
Charon deleted branch chore/go-1.26-modernization 2026-02-24 18:01:42 +00:00
Sign in to join this conversation.
No description provided.