mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Support default redis address
This commit is contained in:
@ -101,6 +101,9 @@ func (opt *Options) init() {
|
||||
if opt.Network == "" {
|
||||
opt.Network = "tcp"
|
||||
}
|
||||
if opt.Addr == "" {
|
||||
opt.Addr = "localhost:6379"
|
||||
}
|
||||
if opt.Dialer == nil {
|
||||
opt.Dialer = func() (net.Conn, error) {
|
||||
netDialer := &net.Dialer{
|
||||
|
Reference in New Issue
Block a user