url: fix parse a comma-separated mongodb url should not return an error#77933
url: fix parse a comma-separated mongodb url should not return an error#77933yueyoum wants to merge 1 commit intogolang:masterfrom
Conversation
|
This PR (HEAD: 5ca2276) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/751360. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/751360. |
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/751360. |
|
Message from Damien Neil: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/751360. |
A valid MongoDB URL can contain commas to include multiple host:port pairs.
The current parseHost function splits the port starting from the first colon (:),
but for MongoDB URLs that contain multiple host:port pairs, it needs to split from the last colon (:).