From 83db590215ef64e181f06cc7394ed7ece4ba970c Mon Sep 17 00:00:00 2001 From: Nicholas Sollazzo Date: Sat, 4 Jul 2026 04:07:31 +0200 Subject: [PATCH] refactor(api): remove dead WithHTTPClient option (POS-109) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WithHTTPClient was an exported Client Option with zero callers anywhere in the module — no production code and no tests. golang.org/x/tools deadcode flags it and a full-repo grep (including _test.go) confirms it. Removing it shrinks the api package's public surface with no behavior change; the http field and its default construction stay untouched, and the sibling WithSleep option (a live test seam) is unaffected. Co-Authored-By: Paperclip --- internal/api/client.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/internal/api/client.go b/internal/api/client.go index 070588d..97300dc 100644 --- a/internal/api/client.go +++ b/internal/api/client.go @@ -74,10 +74,6 @@ type Client struct { // Option customizes a Client. type Option func(*Client) -// WithHTTPClient replaces the underlying *http.Client (e.g. for a custom -// transport). The caller owns the timeout configuration. -func WithHTTPClient(h *http.Client) Option { return func(c *Client) { c.http = h } } - // WithSleep replaces the backoff sleep function — a test seam so retry tests // assert waits instead of serving them. func WithSleep(fn func(time.Duration)) Option { return func(c *Client) { c.sleep = fn } }