code: func fieldPath(pod *v1.Pod, container *v1.Container) (string, error) {
  	for i := range pod.Spec.Containers {
  		here := &pod.Spec.Containers[i]
  		if here.Name == container.Name {
  			if here.Name == "" {
  				return fmt.Sprintf("spec.containers[%d]", i), nil
  			}
  			return fmt.Sprintf("spec.containers{%s}", here.Name), nil
  		}
  	}
  	for i := range pod.Spec.InitContainers {
  		here := &pod.Spec.InitContainers[i]
  		if here.Name == container.Name {
  			if here.Name == "" {
  				return fmt.Sprintf("spec.initContainers[%d]", i), nil
  			}
  			return fmt.Sprintf("spec.initContainers{%s}", here.Name), nil
  		}
  	}
  	return "", fmt.Errorf("container %q not found in pod %s/%s", container.Name, pod.Namespace, pod.Name)
  }
docs: // fieldPath returns a fieldPath locating container within pod.
  // Returns an error if the container isn't part of the pod.