chore: Go 1.26 modernization #2

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

Modernize Go 1.23-era patterns to Go 1.26 idioms.

  • fmt.Errorf(static)errors.New (26 occurrences)
  • Extract repeated sentinel errors to package-level vars:
    • ErrIdentityNotInitialized (8 uses)
    • ErrMinerManagerNotConfigured (3 uses)
  • Manual min/max → min()/max() builtins (1 occurrence)
  • Sorted map keys → slices.Sorted(maps.Keys()) (1 occurrence)

Sentinel extraction enables errors.Is() matching. All changes pass go build and go vet. No test files modified.

Modernize Go 1.23-era patterns to Go 1.26 idioms. - `fmt.Errorf(static)` → `errors.New` (26 occurrences) - Extract repeated sentinel errors to package-level vars: - `ErrIdentityNotInitialized` (8 uses) - `ErrMinerManagerNotConfigured` (3 uses) - Manual min/max → `min()`/`max()` builtins (1 occurrence) - Sorted map keys → `slices.Sorted(maps.Keys())` (1 occurrence) Sentinel extraction enables `errors.Is()` matching. All changes pass `go build` and `go vet`. No test files modified.
Charon added 4 commits 2026-02-24 16:42:57 +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>
chore: use slices.Sorted(maps.Keys()) for ordered iteration
All checks were successful
Security Scan / security (pull_request) Successful in 14s
Test / test (pull_request) Successful in 2m5s
030834905e
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Charon merged commit 8f049dd29c into main 2026-02-24 18:01:44 +00:00
Charon deleted branch chore/go-1.26-modernization 2026-02-24 18:01:45 +00:00
Sign in to join this conversation.
No description provided.