code: func cleanServer(server string) (string, error) {
  	if !isURLOrHostPort(server) {
  		return "", fmt.Errorf("server %q does not look like a server address and could be confused with a server alias. It should look like [http[s]://]foo[.com][:port] with at least one of the optional parts.", server)
  	}
  	// Remove trailing slash if provided.
  	if strings.HasSuffix(server, "/") {
  		server = server[0 : len(server)-1]
  	}
  	// Default to "https://" when not specified
  	if !strings.HasPrefix(server, "http") && !strings.HasPrefix(server, "https") {
  		server = "https://" + server
  	}
  	return server, nil
  }
docs: // cleanServer returns the canonical URL of the provided server, which must be a URL, IP, host (with dot), or host/ip:port.
  // The returned canonical URL will have trailing slashes removed and be prepended with "https://" if no scheme is provided.