mirror of https://github.com/go-redis/redis.git
docs: correct the format error of the url in 'Connecting via a redis url' section (#2789)
* docs: correct the format error of the url in 'Connecting via a redis url' section * docs: change secret to password in redis url exmaple --------- Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
This commit is contained in:
parent
86c68be278
commit
716906adda
|
@ -152,7 +152,7 @@ import (
|
||||||
var ctx = context.Background()
|
var ctx = context.Background()
|
||||||
|
|
||||||
func ExampleClient() {
|
func ExampleClient() {
|
||||||
url := "redis://localhost:6379?password=hello&protocol=3"
|
url := "redis://user:password@localhost:6379/0?protocol=3"
|
||||||
opts, err := redis.ParseURL(url)
|
opts, err := redis.ParseURL(url)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|
Loading…
Reference in New Issue