go-redis
go-redis copied to clipboard
Redis Go client
```go import ( "context" "errors" "testing" "time" "github.com/alicebob/miniredis/v2" "github.com/redis/go-redis/v9" ) func TestContext(t *testing.T) { s := miniredis.RunT(t) redisClient := redis.NewClient(&redis.Options{ Network: s.Server().Addr().Network(), Addr: s.Addr(), ContextTimeoutEnabled: true, }) t.Run("cancel context", func(t...
(Let me know if improvement/feature suggestions are better placed to be in discussions - I wasn't sure. **Note**: There is also a proposed implementation linked within.) Discussed version: `v9.4.0` Dear...
If you create a redis client using sentinel failover options but you have to use a different db than 0 and route your read only queries to slaves , different...
## Current Behavior panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x473670] goroutine 3634082 [running]: bufio.(*Writer).Write(0xc014802a00, {0x0?, 0x2ae87eb90770?, 0x62b5?}) /data/golang/go/src/bufio/bufio.go:680 +0x175 github.com/redis/go-redis/v9/internal/proto.(*Writer).bytes(0xc014802a40,...
## Expected Behavior According to the [redis doc](https://redis.io/docs/data-types/sorted-sets/), zset members should always be strings. We want zset members to be returned as strings so that we don't have to do...
https://github.com/redis/go-redis/issues/2557 go-redis v9 `AddHook` API cause data race issue. This pr allow users set hooks in options for NewClient APIs, this will not cause data race. And IMO in most...
There seems to be zero way to listen for when the connection closes...I am looking for something like: ```golang c := make(chan interface{}) client.notifyClose(c); go func() { for { v...
When the password for a Redis connection string contains an '@' symbol, the connection cannot be recognized, for example: redis://:xxx!@[email protected]:6379/10
In various functions within the go-redis library, there is a use of panic to handle cases. Using panic for this purpose is not in line with Go's idiomatic error handling...