code: func ParseRedisSocketURL(url string) (path, password string, db int, err error) {
  	parts := strings.Split(url, "redis+socket://")
  	if parts[0] != "" {
  		err = errors.New("No redis scheme found")
  		return
  	}
  
  	// redis+socket://password@/path/to/file.soc:/db
  
  	if len(parts) != 2 {
  		err = fmt.Errorf("Redis socket connection string should be in format redis+socket://password@/path/to/file.sock:/db, instead got %s", url)
  		return
  	}
  
  	remainder := parts[1]
  
  	// Extract password if any
  	parts = strings.SplitN(remainder, "@", 2)
  	if len(parts) == 2 {
  		password = parts[0]
  		remainder = parts[1]
  	} else {
  		remainder = parts[0]
  	}
  
  	// Extract path
  	parts = strings.SplitN(remainder, ":", 2)
  	path = parts[0]
  	if path == "" {
  		err = fmt.Errorf("Redis socket connection string should be in format redis+socket://password@/path/to/file.sock:/db, instead got %s", url)
  		return
  	}
  	if len(parts) == 2 {
  		remainder = parts[1]
  	}
  
  	// Extract DB if any
  	parts = strings.SplitN(remainder, "/", 2)
  	if len(parts) == 2 {
  		db, _ = strconv.Atoi(parts[1])
  	}
  
  	return
  }
docs: // ParseRedisSocketURL extracts Redis connection options from a URL with the
  // redis+socket:// scheme. This scheme is not standard (or even de facto) and
  // is used as a transitional mechanism until the the config package gains the
  // proper facilities to support socket-based connections.