Skip to content

fix: resolve golangci-lint issues and 386 test failure#736

Merged
ernado merged 1 commit into
masterfrom
fix/lint-and-386
Jun 12, 2026
Merged

fix: resolve golangci-lint issues and 386 test failure#736
ernado merged 1 commit into
masterfrom
fix/lint-and-386

Conversation

@ernado

@ernado ernado commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace errors.Errorf with a %w directive by errors.Wrap/errors.Wrapf across the codebase. go-faster/errors.Errorf does handle %w at runtime (it delegates to fmt.Errorf), but govet's printf analyzer doesn't recognize it as %w-supporting and flags every usage. This matches the maintainer's recent direction (0ae340b).
  • Mark the floodwait error-set slices (perTypeWaitErrors, localWaitErrors) with // nolint:gochecknoglobals, consistent with the existing pattern in storage/key.go.
  • Fix the arch: 386 CI failure: TestAsWait/ClampHigh used FLOOD_WAIT_9999999999, whose argument overflows a 32-bit int, so tgerr couldn't strip the trailing number and the type match failed. Switched to FLOOD_WAIT_99999999 — still above maxWaitSeconds so it exercises the upper clamp, but within a 32-bit int.

Test plan

  • golangci-lint run ./... → 0 issues
  • go test ./... passes
  • GOARCH=386 go test ./... passes

🤖 Generated with Claude Code

Replace errors.Errorf with %w by errors.Wrap/Wrapf across the codebase,
since go-faster/errors.Errorf is not recognized as %w-supporting by govet.
Mark floodwait error-set slices with nolint:gochecknoglobals.

Use a clamp test argument that fits in a 32-bit int so TestAsWait/ClampHigh
parses correctly on 386 as well as 64-bit platforms.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ernado ernado merged commit 8eb1a0c into master Jun 12, 2026
15 checks passed
@ernado ernado deleted the fix/lint-and-386 branch June 12, 2026 18:32
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.

1 participant