-
Notifications
You must be signed in to change notification settings - Fork 905
GODRIVER-3429 Revert internal-only "AuthenticateToAnything". #2025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
42b3754
to
81b9815
Compare
API Change ReportNo changes found! |
5e7cc5f
to
5ad38c2
Compare
5ad38c2
to
16f8f28
Compare
@@ -85,6 +90,74 @@ func TestLoadBalancedFromConnString(t *testing.T) { | |||
} | |||
} | |||
|
|||
type testAuthenticator struct{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can add a compile check asserting that this type implements driver.Authenticator
?
case "authenticateToAnything": | ||
b, ok := option.(bool) | ||
if !ok { | ||
return fmt.Errorf(typeErr, key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we update these errors to describe the type that we want? Possible using some kind of composing function:
typeErrFuc := func() string {
return fmt.Sprintf("unexecpted type for %q, wanted %T, got %T", key, option, option)
}
@@ -9,6 +9,7 @@ package xoptions | |||
import ( | |||
"fmt" | |||
|
|||
internalOptions "go.mongodb.org/mongo-driver/v2/internal/options" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we rename the internal/options package to internal/optionsutil? That seems to follow the existing pattern. Then we can avoid aliasing imports.
GODRIVER-3429
Summary
PerformAuthentication
inHandshakeOptions
.Background & Motivation