From 9e1324698deac41e967bb62aa3bcd6136b141bcd Mon Sep 17 00:00:00 2001 From: Cody Oss Date: Wed, 9 Nov 2022 14:18:19 -0600 Subject: [PATCH] docs: document limitation of WithUserAgent --- 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) }