1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-31 05:04:23 +03:00

Add WithTimeout

This commit is contained in:
Vladimir Mihailenco
2020-02-02 14:59:27 +02:00
parent 2df96f7ef0
commit d2e52839ee
4 changed files with 62 additions and 18 deletions

View File

@ -169,6 +169,11 @@ func (opt *Options) init() {
}
}
func (opt *Options) clone() *Options {
clone := *opt
return &clone
}
// ParseURL parses an URL into Options that can be used to connect to Redis.
func ParseURL(redisURL string) (*Options, error) {
o := &Options{Network: "tcp"}