Skip to content
This repository has been archived by the owner on May 29, 2020. It is now read-only.

Provide Dial(net, addr) #22

Open
tj opened this issue Feb 13, 2015 · 4 comments
Open

Provide Dial(net, addr) #22

tj opened this issue Feb 13, 2015 · 4 comments

Comments

@tj
Copy link

tj commented Feb 13, 2015

over the millisecond int?

@philhofer
Copy link
Member

Yeah, I agree that DialTimeout("tcp", ":7070", 500*time.Millisecond) reads better.

The reason there isn't a default Dial() (w/o timeout) is because the range of desirable real-world timeouts is pretty enormous. Do you have an opinion about what a reasonable default would be?

@tj
Copy link
Author

tj commented Feb 13, 2015

True! A few seconds seems like it would be generous but I agree it might be better to just force people to make their own choice

@philhofer
Copy link
Member

So I changed Dial to use time.Duration. I'm going to leave the issue open in case someone feels strongly about the simpler constructor.

@philhofer philhofer changed the title Provide Dial(net, addr) and DialTimeout(network, address string, timeout time.Duration) Provide Dial(net, addr) Feb 13, 2015
@tj
Copy link
Author

tj commented Feb 13, 2015

rad!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants