func findPortByName(container core.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)
}
// findPortByName is a helper function to look up a port in a container by name.
findPortByName is a helper function to look up a port in a container by name.
// findPortByName is a helper function to look up a port in a container by name .
func findPortByName(container core.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)
}
func findPortByName ( container core . Container , portName string ) ( int , error ) { for _ , port := range container . Ports { if port . Name == portName { return int ( port . ContainerPort ) , nil } } return 0 , fmt . Errorf ( " " , portName ) }
findPortByName is a helper function to look up a port in a container by name.
findPortByName is a helper function to look up a port in a container by name .