code: func ParseURL(daemonURL string) (*Spec, error) {
  	u, err := url.Parse(daemonURL)
  	if err != nil {
  		return nil, err
  	}
  	if u.Scheme != "ssh" {
  		return nil, errors.Errorf("expected scheme ssh, got %q", u.Scheme)
  	}
  
  	var sp Spec
  
  	if u.User != nil {
  		sp.User = u.User.Username()
  		if _, ok := u.User.Password(); ok {
  			return nil, errors.New("plain-text password is not supported")
  		}
  	}
  	sp.Host = u.Hostname()
  	if sp.Host == "" {
  		return nil, errors.Errorf("no host specified")
  	}
  	sp.Port = u.Port()
  	if u.Path != "" {
  		return nil, errors.Errorf("extra path after the host: %q", u.Path)
  	}
  	if u.RawQuery != "" {
  		return nil, errors.Errorf("extra query after the host: %q", u.RawQuery)
  	}
  	if u.Fragment != "" {
  		return nil, errors.Errorf("extra fragment after the host: %q", u.Fragment)
  	}
  	return &sp, err
  }
docs: // ParseURL parses URL