code: func (d *Disco) Discover(hostname svchost.Hostname) (*Host, error) {
  	if host, cached := d.hostCache[hostname]; cached {
  		return host, nil
  	}
  
  	host, err := d.discover(hostname)
  	if err != nil {
  		return nil, err
  	}
  	d.hostCache[hostname] = host
  
  	return host, nil
  }
docs: // Discover runs the discovery protocol against the given hostname (which must
  // already have been validated and prepared with svchost.ForComparison) and
  // returns an object describing the services available at that host.
  //
  // If a given hostname supports no Terraform services at all, a non-nil but
  // empty Host object is returned. When giving feedback to the end user about
  // such situations, we say "host <name> does not provide a <service> service",
  // regardless of whether that is due to that service specifically being absent
  // or due to the host not providing Terraform services at all, since we don't
  // wish to expose the detail of whole-host discovery to an end-user.