code: func fetch(source string, duration, timeout time.Duration, ui plugin.UI, tr http.RoundTripper) (p *profile.Profile, src string, err error) {
  	var f io.ReadCloser
  
  	if sourceURL, timeout := adjustURL(source, duration, timeout); sourceURL != "" {
  		ui.Print("Fetching profile over HTTP from " + sourceURL)
  		if duration > 0 {
  			ui.Print(fmt.Sprintf("Please wait... (%v)", duration))
  		}
  		f, err = fetchURL(sourceURL, timeout, tr)
  		src = sourceURL
  	} else if isPerfFile(source) {
  		f, err = convertPerfData(source, ui)
  	} else {
  		f, err = os.Open(source)
  	}
  	if err == nil {
  		defer f.Close()
  		p, err = profile.Parse(f)
  	}
  	return
  }
docs: // fetch fetches a profile from source, within the timeout specified,
  // producing messages through the ui. It returns the profile and the
  // url of the actual source of the profile for remote profiles.