package redis

import (
	"haixun-backend/internal/config"

	goredis "github.com/redis/go-redis/v9"
)

func NewClient(conf config.RedisConf) *goredis.Client {
	if conf.Addr == "" {
		return nil
	}
	return goredis.NewClient(&goredis.Options{
		Addr: conf.Addr,
		DB:   conf.DB,
	})
}
