Skip to content

chore(lint): de-deprecate httprate.LimitByIP + gofmt addrresolver (unblock CI)#3509

Merged
0pcom merged 1 commit into
skycoin:developfrom
0pcom:chore/fix-develop-lint-debt-httprate-gofmt
Jul 17, 2026
Merged

chore(lint): de-deprecate httprate.LimitByIP + gofmt addrresolver (unblock CI)#3509
0pcom merged 1 commit into
skycoin:developfrom
0pcom:chore/fix-develop-lint-debt-httprate-gofmt

Conversation

@0pcom

@0pcom 0pcom commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

golangci-lint on ./... (v2.12.2, after the recent httprate dependency bump) surfaces two pre-existing develop lint errors that currently fail the linux/darwin/windows jobs on every open PR:

pkg/transport/network/addrresolver/client.go:753:1: File is not properly formatted (gofmt)
pkg/uptime-tracker/api/api.go:131:10: SA1019: httprate.LimitByIP is deprecated (staticcheck)

Fixes:

  • uptime-tracker/api: replace the deprecated httprate.LimitByIP(...) with the explicit httprate.LimitBy(..., keyByRemoteAddr) + a local keyByRemoteAddr key func inlining the old KeyByIP behavior (per-r.RemoteAddr, IPv6 canonicalized to /64). Identical runtime behavior — the deprecation only asks callers to state the trust model explicitly.
  • addrresolver/client.go: gofmt -w (a stray double blank line).

Doc/format + behavior-preserving only. go build ./..., gofmt, and golangci-lint clean. Unblocks #3507, #3508, and other open PRs.

golangci-lint on ./... (v2.12.2, after the httprate dep bump) surfaced two
pre-existing develop lint errors that block every PR's CI:

- pkg/uptime-tracker/api/api.go: httprate.LimitByIP is deprecated (SA1019).
  Replace with the explicit non-deprecated LimitBy + a local keyByRemoteAddr
  key func that inlines the old KeyByIP behavior (per-r.RemoteAddr, IPv6 /64).
  Identical runtime behavior; just states the trust model explicitly.
- pkg/transport/network/addrresolver/client.go: gofmt (a stray double blank
  line). gofmt -w.
@0pcom
0pcom merged commit 2055e92 into skycoin:develop Jul 17, 2026
5 of 12 checks passed
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