init.go 376 字节
package redis

import (
	"fmt"
	"github.com/tiptok/gocomm/pkg/redis"
	"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/constant"
	"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/log"
)

func init() {
	redisSource := fmt.Sprintf("%v:%v", constant.REDIS_HOST, constant.REDIS_PORT)
	err := redis.InitWithDb(100, redisSource, constant.REDIS_AUTH, "0")
	if err != nil {
		log.Error(err)
	}
}