add redis database selection (#100)

*  add redis database selection

* 📝 update docs

* 📝 readme
This commit is contained in:
maxlerebourg
2023-05-25 17:20:14 +02:00
committed by GitHub
parent abae7ee028
commit 0c2668d578
10 changed files with 57 additions and 33 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ import simpleredis "github.com/maxlerebourg/simpleredis"
var redis simpleredis.SimpleRedis
redis.Init("redis:6379", "") // redisHost, redisPass
redis.Init("redis:6379", "", "") // redisHost, redisPass, redisDatabase
err := redis.Set("test", []bytes("whatever"), 60), // Set key "test" with "whatever" for 60 seconds
if err != nil {