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:
ccx 2023-12-17 21:34:17 +08:00 committed by GitHub
parent 86c68be278
commit 716906adda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ import (
var ctx = context.Background()
func ExampleClient() {
url := "redis://localhost:6379?password=hello&protocol=3"
url := "redis://user:password@localhost:6379/0?protocol=3"
opts, err := redis.ParseURL(url)
if err != nil {
panic(err)