code: func formatURL(scheme string, host string, port int, path string) *url.URL {
  	u, err := url.Parse(path)
  	// Something is busted with the path, but it's too late to reject it. Pass it along as is.
  	if err != nil {
  		u = &url.URL{
  			Path: path,
  		}
  	}
  	u.Scheme = scheme
  	u.Host = net.JoinHostPort(host, strconv.Itoa(port))
  	return u
  }
docs: // formatURL formats a URL from args.  For testability.