From 6b0bad83083d53363e5975ba3d087ce6d826f678 Mon Sep 17 00:00:00 2001 From: mgianluc Date: Sun, 1 Dec 2024 11:44:43 +0100 Subject: [PATCH] Add Cluster info when displaying diff --- internal/commands/show/dryrun.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/commands/show/dryrun.go b/internal/commands/show/dryrun.go index 89c88e9..60dffe5 100644 --- a/internal/commands/show/dryrun.go +++ b/internal/commands/show/dryrun.go @@ -162,7 +162,8 @@ func displayDryRunForCluster(clusterReport *configv1alpha1.ClusterReport, profil if rawDiff { if rawDiff && report.Message != "" && report.Action == string(configv1alpha1.UpdateResourceAction) { //nolint: forbidigo // print diff - fmt.Println(report.Message) + fmt.Printf("Cluster: %s/%s\n%s\n", clusterReport.Spec.ClusterNamespace, clusterReport.Spec.ClusterName, + report.Message) } } } @@ -179,7 +180,8 @@ func displayDryRunForCluster(clusterReport *configv1alpha1.ClusterReport, profil if rawDiff { if rawDiff && report.Message != "" && report.Action == string(configv1alpha1.UpdateResourceAction) { //nolint: forbidigo // print diff - fmt.Println(report.Message) + fmt.Printf("Cluster: %s/%s\n%s\n", clusterReport.Spec.ClusterNamespace, clusterReport.Spec.ClusterName, + report.Message) } } }