refactor: removed sample flag

Commented out the sample flag that the framework comes with, as it was not in use. Choose to comment it out for now for easy reference, just in case we want to implement that type of toggle flags.

Signed-off-by: Roberth Strand <me@robstr.dev>
This commit is contained in:
Roberth Strand
2023-03-30 11:48:43 +02:00
parent f95c1e1d8c
commit 0afd52844b

View File

@@ -1,9 +1,10 @@
package cmd package cmd
import ( import (
"github.com/k8sgpt-ai/k8sgpt/cmd/generate"
"os" "os"
"github.com/k8sgpt-ai/k8sgpt/cmd/generate"
"github.com/fatih/color" "github.com/fatih/color"
"github.com/k8sgpt-ai/k8sgpt/cmd/analyze" "github.com/k8sgpt-ai/k8sgpt/cmd/analyze"
"github.com/k8sgpt-ai/k8sgpt/cmd/auth" "github.com/k8sgpt-ai/k8sgpt/cmd/auth"
@@ -53,7 +54,7 @@ func init() {
rootCmd.PersistentFlags().StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.") rootCmd.PersistentFlags().StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
// Cobra also supports local flags, which will only run // Cobra also supports local flags, which will only run
// when this action is called directly. // when this action is called directly.
rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") // rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
//Initialise the kubeconfig //Initialise the kubeconfig
kubernetesClient, err := kubernetes.NewClient(masterURL, kubeconfig) kubernetesClient, err := kubernetes.NewClient(masterURL, kubeconfig)