From 567070f3835f9f4039ed121de7319f9cf5a5af6b Mon Sep 17 00:00:00 2001 From: Cody Oss <6331106+codyoss@users.noreply.github.com> Date: Thu, 10 Nov 2022 08:13:46 -0600 Subject: [PATCH] docs: document limitation of WithUserAgent (#1747) --- option/option.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/option/option.go b/option/option.go index f56a8c1d906..b2085a1949a 100644 --- a/option/option.go +++ b/option/option.go @@ -96,7 +96,9 @@ func (w withScopes) Apply(o *internal.DialSettings) { copy(o.Scopes, w) } -// WithUserAgent returns a ClientOption that sets the User-Agent. +// WithUserAgent returns a ClientOption that sets the User-Agent. This option +// is incompatible with the [WithHTTPClient] option. If you wish to provide a +// custom client you will need to add this header via RoundTripper middleware. func WithUserAgent(ua string) ClientOption { return withUA(ua) }