mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Add ParseURL example
This commit is contained in:
@ -125,7 +125,7 @@ func (opt *Options) init() {
|
||||
}
|
||||
}
|
||||
|
||||
// ParseURL parses a redis URL into options that can be used to connect to redis
|
||||
// ParseURL parses an URL into Options that can be used to connect to Redis.
|
||||
func ParseURL(redisURL string) (*Options, error) {
|
||||
o := &Options{Network: "tcp"}
|
||||
u, err := url.Parse(redisURL)
|
||||
|
Reference in New Issue
Block a user