func (p *provider) ListClusters() ([]string, error) {
	cmd := exec.Command("podman",
		"ps",
		"-a", // show stopped nodes
		// filter for nodes with the cluster label
		"--filter", "label="+clusterLabelKey,
		// format to include the cluster name
		"--format", fmt.Sprintf(`{{index .Labels "%s"}}`, clusterLabelKey),
	)
	lines, err := exec.OutputLines(cmd)
	if err != nil {
		return nil, errors.Wrap(err, "failed to list clusters")
	}
	return sets.NewString(lines...).List(), nil
}
// ListClusters is part of the providers.Provider interface
ListClusters is part of the providers.Provider interface
// ListClusters is part of the providers . Provider interface
func (p *provider) ListClusters() ([]string, error) {
	cmd := exec.Command("podman",
		"ps",
		"-a", 
		"--filter", "label="+clusterLabelKey,
		"--format", fmt.Sprintf(`{{index .Labels "%s"}}`, clusterLabelKey),
	)
	lines, err := exec.OutputLines(cmd)
	if err != nil {
		return nil, errors.Wrap(err, "failed to list clusters")
	}
	return sets.NewString(lines...).List(), nil
}
func ( p * provider ) ListClusters ( ) ( [ ] string , error ) { cmd := exec . Command ( " " , " " , " " , " " , " " + clusterLabelKey , " " , fmt . Sprintf ( `{{index .Labels "%s"}}` , clusterLabelKey ) , ) lines , err := exec . OutputLines ( cmd ) if err != nil { return nil , errors . Wrap ( err , " " ) } return sets . NewString ( lines ... ) . List ( ) , nil }
ListClusters is part of the providers.Provider interface
ListClusters is part of the providers . Provider interface
// show stopped nodes // filter for nodes with the cluster label // format to include the cluster name