code: func baseURL(serverBaseURL, listenAddr string) (string, error) {
  	backendURL, err := url.Parse(serverBaseURL)
  	if err != nil {
  		return "", fmt.Errorf("invalid baseURL %q: %v", serverBaseURL, err)
  	}
  	scheme := backendURL.Scheme
  	host := backendURL.Host
  	if netutil.HasPort(host) {
  		host = host[:strings.LastIndex(host, ":")]
  	}
  	port := portMap[scheme]
  	if netutil.HasPort(listenAddr) {
  		port = listenAddr[strings.LastIndex(listenAddr, ":")+1:]
  	}
  	return fmt.Sprintf("%s://%s:%s/", scheme, host, port), nil
  }
docs: // baseURL returns the concatenation of the scheme and host parts of
  // serverBaseURL with the port of listenAddr.