// DialRedis dial a redis and create *Redis
DialRedis dial a redis and create *Redis
// DialRedis dial a redis and create * Redis
func DialRedis(url string, key string) (b *Redis, err error) {
	var opt *redis.Options
	if opt, err = redis.ParseURL(url); err != nil {
		return
	}
	var client = redis.NewClient(opt)
	if err = client.Ping().Err(); err != nil {
		return
	}
	b = &Redis{Client: client, Key: key}
	return
}
func DialRedis ( url string , key string ) ( b * Redis , err error ) { var opt * redis . Options if opt , err = redis . ParseURL ( url ) ; err != nil { return } var client = redis . NewClient ( opt ) if err = client . Ping ( ) . Err ( ) ; err != nil { return } b = & Redis { Client : client , Key : key } return }
DialRedis dial a redis and create *Redis
DialRedis dial a redis and create * Redis
// parse redis.Options // create redis client and ping