code: func ResourceLocation(getter ResourceGetter, rt http.RoundTripper, ctx context.Context, id string) (*url.URL, http.RoundTripper, error) {
  	// Allow ID as "podname" or "podname:port" or "scheme:podname:port".
  	// If port is not specified, try to use the first defined port on the pod.
  	scheme, name, port, valid := utilnet.SplitSchemeNamePort(id)
  	if !valid {
  		return nil, nil, errors.NewBadRequest(fmt.Sprintf("invalid pod request %q", id))
  	}
  	// TODO: if port is not a number but a "(container)/(portname)", do a name lookup.
  
  	pod, err := getPod(getter, ctx, name)
  	if err != nil {
  		return nil, nil, err
  	}
  
  	// Try to figure out a port.
  	if port == "" {
  		for i := range pod.Spec.Containers {
  			if len(pod.Spec.Containers[i].Ports) > 0 {
  				port = fmt.Sprintf("%d", pod.Spec.Containers[i].Ports[0].ContainerPort)
  				break
  			}
  		}
  	}
  
  	if err := proxyutil.IsProxyableIP(pod.Status.PodIP); err != nil {
  		return nil, nil, errors.NewBadRequest(err.Error())
  	}
  
  	loc := &url.URL{
  		Scheme: scheme,
  	}
  	if port == "" {
  		loc.Host = pod.Status.PodIP
  	} else {
  		loc.Host = net.JoinHostPort(pod.Status.PodIP, port)
  	}
  	return loc, rt, nil
  }
docs: // ResourceLocation returns a URL to which one can send traffic for the specified pod.