code: func (h *Host) ServiceURL(id string) (*url.URL, error) {
  	svc, ver, err := parseServiceID(id)
  	if err != nil {
  		return nil, err
  	}
  
  	// No services supported for an empty Host.
  	if h == nil || h.services == nil {
  		return nil, &ErrServiceNotProvided{service: svc}
  	}
  
  	urlStr, ok := h.services[id].(string)
  	if !ok {
  		// See if we have a matching service as that would indicate
  		// the service is supported, but not the requested version.
  		for serviceID := range h.services {
  			if strings.HasPrefix(serviceID, svc+".") {
  				return nil, &ErrVersionNotSupported{
  					hostname: h.hostname,
  					service:  svc,
  					version:  ver.Original(),
  				}
  			}
  		}
  
  		// No discovered services match the requested service.
  		return nil, &ErrServiceNotProvided{hostname: h.hostname, service: svc}
  	}
  
  	u, err := url.Parse(urlStr)
  	if err != nil {
  		return nil, fmt.Errorf("Failed to parse service URL: %v", err)
  	}
  
  	// Make relative URLs absolute using our discovery URL.
  	if !u.IsAbs() {
  		u = h.discoURL.ResolveReference(u)
  	}
  
  	if u.Scheme != "https" && u.Scheme != "http" {
  		return nil, fmt.Errorf("Service URL is using an unsupported scheme: %s", u.Scheme)
  	}
  	if u.User != nil {
  		return nil, fmt.Errorf("Embedded username/password information is not permitted")
  	}
  
  	// Fragment part is irrelevant, since we're not a browser.
  	u.Fragment = ""
  
  	return h.discoURL.ResolveReference(u), nil
  }
docs: // ServiceURL returns the URL associated with the given service identifier,
  // which should be of the form "servicename.vN".
  //
  // A non-nil result is always an absolute URL with a scheme of either HTTPS
  // or HTTP.