code: func connect(param ConnectionParam) func() (redis.Conn, error) {
  	return func() (cnx redis.Conn, err error) {
  		options := make([]redis.DialOption, 0)
  		if param.UseTLS {
  			options = append(options, redis.DialUseTLS(param.UseTLS))
  		}
  
  		if param.Password != "" {
  			options = append(options, redis.DialPassword(param.Password))
  		}
  
  		if param.Timeout > 0 {
  			options = append(options, []redis.DialOption{
  				redis.DialConnectTimeout(param.Timeout),
  				redis.DialReadTimeout(param.Timeout),
  				redis.DialWriteTimeout(param.Timeout),
  			}...)
  		}
  
  		cnx, err = redis.Dial("tcp", param.Address, options...)
  		return
  	}
  }
docs: // connect is a higher-order function that returns a function that dials,
  // connects, and authenticates a Redis connection.
  //
  // It attempts to dial a TCP connection to the address specified, timing out if
  // no connection was able to be established within the given time-frame. If no
  // timeout was given, it will wait indefinitely.
  //
  // If a password as specified in the ConnectionParam object, then an `AUTH`
  // command (see: http://redis.io/commands/auth) is issued with that password.
  //
  // If an error is incurred either dialing the TCP connection, or sending the
  // `AUTH` command, then it will be returned immediately, and the client can be
  // considered useless.