Skip to content

Commit

Permalink
docs(option): clarify behavior of WithScopes
Browse files Browse the repository at this point in the history
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 googleapis#1644
  • Loading branch information
eisandbar committed Aug 17, 2022
1 parent 9ea025d commit 857d518
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions option/option.go
Expand Up @@ -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)
}
Expand Down

0 comments on commit 857d518

Please sign in to comment.