code: func adjustURL(source string, duration, timeout time.Duration) (string, time.Duration) {
  	u, err := url.Parse(source)
  	if err != nil || (u.Host == "" && u.Scheme != "" && u.Scheme != "file") {
  		// Try adding http:// to catch sources of the form hostname:port/path.
  		// url.Parse treats "hostname" as the scheme.
  		u, err = url.Parse("http://" + source)
  	}
  	if err != nil || u.Host == "" {
  		return "", 0
  	}
  
  	// Apply duration/timeout overrides to URL.
  	values := u.Query()
  	if duration > 0 {
  		values.Set("seconds", fmt.Sprint(int(duration.Seconds())))
  	} else {
  		if urlSeconds := values.Get("seconds"); urlSeconds != "" {
  			if us, err := strconv.ParseInt(urlSeconds, 10, 32); err == nil {
  				duration = time.Duration(us) * time.Second
  			}
  		}
  	}
  	if timeout <= 0 {
  		if duration > 0 {
  			timeout = duration + duration/2
  		} else {
  			timeout = 60 * time.Second
  		}
  	}
  	u.RawQuery = values.Encode()
  	return u.String(), timeout
  }
docs: // adjustURL validates if a profile source is a URL and returns an
  // cleaned up URL and the timeout to use for retrieval over HTTP.
  // If the source cannot be recognized as a URL it returns an empty string.