From 0dad33144a83a104c9bcb9d460e70c150818ee98 Mon Sep 17 00:00:00 2001 From: cmoulliard Date: Thu, 14 Nov 2024 13:10:12 +0100 Subject: [PATCH] Fix fmt.Printf error due to wrong var used Signed-off-by: cmoulliard --- pkg/cmd/get/clusters.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg/cmd/get/clusters.go b/pkg/cmd/get/clusters.go index b5ebddd3..d4aeb89a 100644 --- a/pkg/cmd/get/clusters.go +++ b/pkg/cmd/get/clusters.go @@ -24,8 +24,6 @@ var ClustersCmd = &cobra.Command{ PreRunE: preClustersE, } -var kubeCfgPath string - func preClustersE(cmd *cobra.Command, args []string) error { return helpers.SetLogger() } @@ -73,12 +71,12 @@ func list(cmd *cobra.Command, args []string) error { } // Search about the idp cluster within the kubeconfig file and show information - cluster, found := findClusterByName(config, "kind-"+cluster) + c, found := findClusterByName(config, "kind-"+cluster) if !found { - fmt.Printf("Cluster %q not found\n", cluster) + fmt.Printf("Cluster not found: %s\n", cluster) } else { - fmt.Printf("URL of the kube API server: %s\n", cluster.Server) - fmt.Printf("TLS Verify: %t\n", cluster.InsecureSkipTLSVerify) + fmt.Printf("URL of the kube API server: %s\n", c.Server) + fmt.Printf("TLS Verify: %t\n", c.InsecureSkipTLSVerify) } fmt.Println("----------------------------------------") }