1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-13 09:12:27 +08:00

Compare commits

..

1 Commits

Author SHA1 Message Date
houseme
6ad5f02eb5 Merge d8e3208ef2 into 05ac7148d4 2024-07-19 04:10:07 +00:00

2
cache/redis.go vendored
View File

@@ -16,7 +16,6 @@ type Redis struct {
// RedisOpts redis 连接属性
type RedisOpts struct {
Host string `yml:"host" json:"host"`
Username string `yaml:"username" json:"username"`
Password string `yml:"password" json:"password"`
Database int `yml:"database" json:"database"`
MaxIdle int `yml:"max_idle" json:"max_idle"`
@@ -29,7 +28,6 @@ func NewRedis(ctx context.Context, opts *RedisOpts) *Redis {
conn := redis.NewUniversalClient(&redis.UniversalOptions{
Addrs: []string{opts.Host},
DB: opts.Database,
Username: opts.Username,
Password: opts.Password,
IdleTimeout: time.Second * time.Duration(opts.IdleTimeout),
MinIdleConns: opts.MaxIdle,