func New(rawurl string) (_ *Client, err error) {
	defer derrors.Wrap(&err, "proxy.New(%q)", rawurl)
	url, err := url.Parse(rawurl)
	if err != nil {
		return nil, fmt.Errorf("url.Parse: %v", err)
	}
	if url.Scheme != "https" {
		return nil, fmt.Errorf("scheme must be https (got %s)", url.Scheme)
	}
	cleanURL := strings.TrimRight(rawurl, "/")
	return &Client{url: cleanURL, httpClient: &http.Client{Transport: &ochttp.Transport{}}}, nil
}
// New constructs a *Client using the provided rawurl, which is expected to
// be an absolute URI that can be directly passed to http.Get.
New constructs a *Client using the provided rawurl, which is expected to
be an absolute URI that can be directly passed to http.Get.
// New constructs a * Client using the provided rawurl which is expected to // be an absolute URI that can be directly passed to http . Get .
func New(rawurl string) (_ *Client, err error) {
	defer derrors.Wrap(&err, "proxy.New(%q)", rawurl)
	url, err := url.Parse(rawurl)
	if err != nil {
		return nil, fmt.Errorf("url.Parse: %v", err)
	}
	if url.Scheme != "https" {
		return nil, fmt.Errorf("scheme must be https (got %s)", url.Scheme)
	}
	cleanURL := strings.TrimRight(rawurl, "/")
	return &Client{url: cleanURL, httpClient: &http.Client{Transport: &ochttp.Transport{}}}, nil
}
func New ( rawurl string ) ( _ * Client , err error ) { defer derrors . Wrap ( & err , " " , rawurl ) url , err := url . Parse ( rawurl ) if err != nil { return nil , fmt . Errorf ( " " , err ) } if url . Scheme != " " { return nil , fmt . Errorf ( " " , url . Scheme ) } cleanURL := strings . TrimRight ( rawurl , " " ) return & Client { url : cleanURL , httpClient : & http . Client { Transport : & ochttp . Transport { } } } , nil }
New constructs a *Client using the provided rawurl, which is expected to
be an absolute URI that can be directly passed to http.Get.
New constructs a * Client using the provided rawurl which is expected to be an absolute URI that can be directly passed to http . Get .