mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Pass network and addr to dialer
This commit is contained in:
@ -39,9 +39,10 @@ var _ = Describe("Client", func() {
|
||||
|
||||
It("should support custom dialers", func() {
|
||||
custom := redis.NewClient(&redis.Options{
|
||||
Addr: ":1234",
|
||||
Dialer: func() (net.Conn, error) {
|
||||
return net.Dial("tcp", redisAddr)
|
||||
Network: "tcp",
|
||||
Addr: redisAddr,
|
||||
Dialer: func(network, addr string) (net.Conn, error) {
|
||||
return net.Dial(network, addr)
|
||||
},
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user