mirror of
https://github.com/redis/go-redis.git
synced 2025-07-26 19:21:03 +03:00
Options: Use DialContext by default
Use net.Dialer DialContext by default because go-redis supports contexts. Resolves #1101
This commit is contained in:
@ -51,7 +51,8 @@ var _ = Describe("Client", func() {
|
||||
Network: "tcp",
|
||||
Addr: redisAddr,
|
||||
Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) {
|
||||
return net.Dial(network, addr)
|
||||
var d net.Dialer
|
||||
return d.DialContext(ctx, network, addr)
|
||||
},
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user