code: func findPortByName(container v1.Container, portName string) (int, error) {
  	for _, port := range container.Ports {
  		if port.Name == portName {
  			return int(port.ContainerPort), nil
  		}
  	}
  	return 0, fmt.Errorf("port %s not found", portName)
  }
docs: // findPortByName is a helper function to look up a port in a container by name.