godoc: clarify WithTimeout deprecation note (#3226)

Tell people to replace Dial + WithTimeout with DialContext + context.WithTimeout.
This commit is contained in:
Stefan Sauer 2019-12-12 22:29:02 +01:00 committed by Doug Fawley
parent cb0e11b54f
commit 032a3799b2
1 changed files with 2 additions and 2 deletions

View File

@ -346,8 +346,8 @@ func WithCredentialsBundle(b credentials.Bundle) DialOption {
// WithTimeout returns a DialOption that configures a timeout for dialing a
// ClientConn initially. This is valid if and only if WithBlock() is present.
//
// Deprecated: use DialContext and context.WithTimeout instead. Will be
// supported throughout 1.x.
// Deprecated: use DialContext instead of Dial and context.WithTimeout
// instead. Will be supported throughout 1.x.
func WithTimeout(d time.Duration) DialOption {
return newFuncDialOption(func(o *dialOptions) {
o.timeout = d