code: func ParseRedisURL(url string) (host, password string, db int, err error) {
  	// redis://pwd@host/db
  
  	var u *neturl.URL
  	u, err = neturl.Parse(url)
  	if err != nil {
  		return
  	}
  	if u.Scheme != "redis" {
  		err = errors.New("No redis scheme found")
  		return
  	}
  
  	if u.User != nil {
  		var exists bool
  		password, exists = u.User.Password()
  		if !exists {
  			password = u.User.Username()
  		}
  	}
  
  	host = u.Host
  
  	parts := strings.Split(u.Path, "/")
  	if len(parts) == 1 {
  		db = 0 //default redis db
  	} else {
  		db, err = strconv.Atoi(parts[1])
  		if err != nil {
  			db, err = 0, nil //ignore err here
  		}
  	}
  
  	return
  }
docs: // ParseRedisURL ...