From 857d518b99b801a82a1782bbf784ec3eb803b270 Mon Sep 17 00:00:00 2001 From: eisandbar Date: Wed, 17 Aug 2022 11:59:31 -0400 Subject: [PATCH] docs(option): clarify behavior of WithScopes 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) }