// Initializes RedisClient for caching functionalities
Initializes RedisClient for caching functionalities
// Initializes RedisClient for caching functionalities
func initRedisClient() {
	if ignoreRedisPassword == "yes" {
		redisClient = redis.NewClient(&redis.Options{
			Addr:     redisHost,
			DB:       0,
		})
		return
	}
	redisClient = redis.NewClient(&redis.Options{
		Addr:     redisHost,
		Password: redisPassword,
		DB:       0,
	})
	pong, err := redisClient.Ping().Result()
	fmt.Println(pong, err)
	if err != nil {
		log.Panic("Error on initializing Redis client, err: " + err.Error())
	}
}
func initRedisClient ( ) { if ignoreRedisPassword == " " { redisClient = redis . NewClient ( & redis . Options { Addr : redisHost , DB : 0 , } ) return } redisClient = redis . NewClient ( & redis . Options { Addr : redisHost , Password : redisPassword , DB : 0 , } ) pong , err := redisClient . Ping ( ) . Result ( ) fmt . Println ( pong , err ) if err != nil { log . Panic ( " " + err . Error ( ) ) } }
Initializes RedisClient for caching functionalities
Initializes RedisClient for caching functionalities