diff --git a/README.md b/README.md index b08330df..98edbe21 100644 --- a/README.md +++ b/README.md @@ -149,15 +149,16 @@ import ( "github.com/redis/go-redis/v9" ) -var ctx = context.Background() - -func ExampleClient() { +func ExampleClient() *redis.Client { url := "redis://user:password@localhost:6379/0?protocol=3" opts, err := redis.ParseURL(url) if err != nil { panic(err) } - rdb := redis.NewClient(opts) + + return redis.NewClient(opts) +} + ``` ## Contributing diff --git a/example/lua-scripting/go.mod b/example/lua-scripting/go.mod index 97416d41..a19f0ab1 100644 --- a/example/lua-scripting/go.mod +++ b/example/lua-scripting/go.mod @@ -1,4 +1,4 @@ -module github.com/redis/go-redis/example/redis-bloom +module github.com/redis/go-redis/example/lua-scripting go 1.18