package infra

import (
	"fmt"
	"os/exec"
	"strings"
)

// DockerRemoveNetwork elimina una red Docker por nombre o ID.
func DockerRemoveNetwork(nameOrID string) error {
	out, err := exec.Command("docker", "network", "rm", nameOrID).CombinedOutput()
	if err != nil {
		return fmt.Errorf("docker network rm %s: %s", nameOrID, strings.TrimSpace(string(out)))
	}
	return nil
}
