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
net: dial should not fail for legitimate urls that work in other languages e.g Redis URLs #20688
Comments
@joelpresence here is how @garyburd connects to Redis in his project redigo https://github.com/garyburd/redigo/blob/master/redis/conn.go#L214-L266. He might have some input on this as well, if you please, @garyburd. |
The example URL parses fine with
I'm going to go ahead an close this since it's not a bug. |
Thanks. We're looking into it. I see lots of issues around this with Go Lang failing on urls that look like this and the failures happen with many other services besides redis. Also, Ruby handles this exact URL without issue ...
Any ideas?
Thanks! :-)
…Sent from my iPhone
On Jun 15, 2017, at 12:28 PM, Emmanuel T Odeke <notifications@github.com<mailto:notifications@github.com>> wrote:
@joelpresence<https://github.com/joelpresence> here is how @garyburd<https://github.com/garyburd> connects to Redis in his project redigo https://github.com/garyburd/redigo/blob/master/redis/conn.go#L214-L266. He might have some input on this as well, if you please, @garyburd<https://github.com/garyburd>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#20688 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ALf8WUqstcwuYhwplIwku_90gL_1BSvRks5sEYXKgaJpZM4N7ooc>.
|
For questions about Go, see https://golang.org/wiki/Questions. |
Fixed using DialURL. Thanks. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.8.1 darwin/amd64
What operating system and processor architecture are you using (
go env
)?darwin amd64
What did you do?
Go cannot connect to a valid url like
redis://user:password@a1.a2.a3.ec2.cloud.redislabs.com:45678
. This is a perfectly valid URL that conforms to the redis scheme and works just fine in other languages like Ruby. Go fails to connect to this using Dial with an error like"dial tcp: address redis://user:password@a1.a2.a3.ec2.cloud.redislabs.com:45678: too many colons in address
which seems to come from ipsock.go.Any suggestions as to how to fix go to connect to this URL? Or how I can fix the url so that go can dial connect to it? I have tried using
[]
all over the place to no avail.Thanks! :-)
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: