Skip to content

Add functional options pattern with WithHTTPClient option#22

Merged
jonathan-kosgei merged 1 commit intomasterfrom
claude/update-ipdata-go-package-tDBG9
Feb 23, 2026
Merged

Add functional options pattern with WithHTTPClient option#22
jonathan-kosgei merged 1 commit intomasterfrom
claude/update-ipdata-go-package-tDBG9

Conversation

@jonathan-kosgei
Copy link
Collaborator

Adds an Option type and WithHTTPClient function to allow callers to inject a custom *http.Client for timeouts, proxies, or instrumentation (e.g. OpenTelemetry). Fully backward-compatible via variadic options.

Fixes #18

https://claude.ai/code/session_01TQxWtmbL5KCKpHRb2GLQ5q

Adds an Option type and WithHTTPClient function to allow callers to
inject a custom *http.Client for timeouts, proxies, or instrumentation
(e.g. OpenTelemetry). Fully backward-compatible via variadic options.

Fixes #18

https://claude.ai/code/session_01TQxWtmbL5KCKpHRb2GLQ5q
@jonathan-kosgei jonathan-kosgei merged commit 7dd04d2 into master Feb 23, 2026
5 checks passed
@jonathan-kosgei jonathan-kosgei deleted the claude/update-ipdata-go-package-tDBG9 branch February 23, 2026 07:45
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.

Allow for configuration of http.Client

2 participants