Skip to content
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

Fix DSN regexp #38

Merged
merged 1 commit into from
Jun 17, 2019
Merged

Fix DSN regexp #38

merged 1 commit into from
Jun 17, 2019

Conversation

weiguoz
Copy link
Collaborator

@weiguoz weiguoz commented Jun 15, 2019

fix #32

@weiguoz weiguoz requested a review from tonyyang-svail June 15, 2019 04:33
Copy link
Collaborator

@tonyyang-svail tonyyang-svail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -8,7 +8,7 @@ import (

var (
// Regexp syntax: https://github.com/google/re2/wiki/Syntax
reDSN = regexp.MustCompile(`^([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)@([a-zA-Z0-9/_.-]+)\?([^/]+)$`)
reDSN = regexp.MustCompile(`^([a-zA-Z0-9_-]+):([=a-zA-Z0-9_-]+)@([:a-zA-Z0-9/_.-]+)\?([^/]+)$`)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems endpoint part do not need :?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

endpoints such as: maxcompute.server.com:8080 or a test env 10.1.2.3:8002

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see!

@weiguoz weiguoz merged commit 34cb362 into develop Jun 17, 2019
@weiguoz weiguoz deleted the dsn_parser branch June 17, 2019 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ParseDSN fails on a special access_key
3 participants