This commit is contained in:
kzkzzzz
2025-03-22 01:24:57 +08:00
parent 197476e805
commit 7e0bf82418
22 changed files with 2291 additions and 919 deletions

19
myredis/option.go Normal file
View File

@@ -0,0 +1,19 @@
package myredis
import (
"github.com/redis/go-redis/v9"
)
type Opt func(*Client)
func WithRedisOpt(v *redis.Options) Opt {
return func(r *Client) {
r.redisOpt = v
}
}
func WithDisablePing(v bool) Opt {
return func(r *Client) {
r.disablePing = v
}
}