Skip to content

Commit

Permalink
docs(option): clarify behavior of WithScopes (#1670)
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 #1644
  • Loading branch information
eisandbar authored Aug 17, 2022
1 parent 9ea025d commit 07ceb9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions option/option.go
Original file line number Diff line number Diff line change
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 07ceb9d

Please sign in to comment.