From 07ceb9d607c85ffaa5bea97be66cf9d426ec55bb Mon Sep 17 00:00:00 2001 From: Andrey Em <55670245+eisandbar@users.noreply.github.com> Date: Wed, 17 Aug 2022 17:04:11 -0400 Subject: [PATCH] docs(option): clarify behavior of WithScopes (#1670) Clarify that when both WithScopes and WithTokenSource are used, the scope settings will be taken from the token source and the WithScopes option will be ignored. Fixes #1644 --- option/option.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/option/option.go b/option/option.go index 27ba9eab018..eb478aacdca 100644 --- a/option/option.go +++ b/option/option.go @@ -82,6 +82,9 @@ func (w withEndpoint) Apply(o *internal.DialSettings) { // WithScopes returns a ClientOption that overrides the default OAuth2 scopes // to be used for a service. +// +// If both WithScopes and WithTokenSource are used, scope settings from the +// token source will be used instead. func WithScopes(scope ...string) ClientOption { return withScopes(scope) }