code: func DiscoverWalk(app App, hostHeaders map[string]http.Header, insecure InsecureOption, port uint, discoverFn DiscoverWalkFunc) (dd *discoveryData, err error) {
  	parts := strings.Split(string(app.Name), "/")
  	for i := range parts {
  		end := len(parts) - i
  		pre := strings.Join(parts[:end], "/")
  
  		dd, err = doDiscover(pre, hostHeaders, app, insecure, port)
  		if derr := discoverFn(pre, dd, err); derr != nil {
  			return dd, derr
  		}
  	}
  
  	return nil, fmt.Errorf("discovery failed")
  }
docs: // DiscoverWalk will make HTTPS requests to find discovery meta tags and
  // optionally will use HTTP if insecure is set. hostHeaders specifies the
  // header to apply depending on the host (e.g. authentication). Based on the
  // response of the discoverFn it will continue to recurse up the tree. If port
  // is 0, the default port will be used.