code: func EndpointFromBareSshUrl(rawurl string) Endpoint {
  	parts := strings.Split(rawurl, ":")
  	partsLen := len(parts)
  	if partsLen < 2 {
  		return Endpoint{Url: rawurl}
  	}
  
  	// Treat presence of ':' as a bare URL
  	var newPath string
  	if len(parts) > 2 { // port included; really should only ever be 3 parts
  		// Correctly handle [host:port]:path URLs
  		parts[0] = strings.TrimPrefix(parts[0], "[")
  		parts[1] = strings.TrimSuffix(parts[1], "]")
  		newPath = fmt.Sprintf("%v:%v", parts[0], strings.Join(parts[1:], "/"))
  	} else {
  		newPath = strings.Join(parts, "/")
  	}
  	newrawurl := fmt.Sprintf("ssh://%v", newPath)
  	newu, err := url.Parse(newrawurl)
  	if err != nil {
  		return Endpoint{Url: UrlUnknown}
  	}
  
  	return EndpointFromSshUrl(newu)
  }
docs: // EndpointFromBareSshUrl constructs a new endpoint from a bare SSH URL:
  //
  //   user@host.com:path/to/repo.git or
  //   [user@host.com:port]:path/to/repo.git
  //